Serialization
- making packet any instance in memory, and put this packet in buffer
- opposite side is deserialization
Session Seperate
- session is deligate
-
So, name is opposite from each
- Server\ClientSession.cs
- Server\Program.cs
- DummyClient\ServerSession.cs
- DummyClient\Program.cs
Test
Write and Read
-
Serialization and Deserialization
-
Server\ClientSession.cs
- DummyClient\ServerSession.cs
Test
resizable data
- ushort is 2 bytes, and long is 8bytes
-
but you cannot decide string
- Serve\ClientSession.cs
- DummyClient\ServerSession.cs
Test
List Packet
- Server\ClientSession.cs
- DummyClient\ServerSession.cs
Test
Packet Generator
PacketFormat
- Create PacketFormat Console app project
- DummyClient\ServerSession.cs
- PacketFormat\PDL.xml
- for Session automatic
- packet definition
- copy
PDL.xml
to\PacketGenerator\bin\Debug\netcoreapp3.1
- PacketForamt\Program.cs
- PacketGenerator\PacketFormat.cs
- you can define several lines of string by
@
- you should `` here
- you can define several lines of string by
Packet Generator
- PacketGenerator\PacketFormat.cs
- PacketGenerator\Program.cs
- Excute Packet Generator project
- as result, it makes
GenPacket.cs
- copy whole code in
GenPacket.cs
and paste it onClientSession.cs
andServerSession.cs
- as result, it makes
- Server\ClientSession.cs
- DummyClient\ServerSession.cs
Test
Byte Packet
- PacketGenerator\bin\Debug\netcoreapp3.1\PDL.xml
- PacketGenerator\PacketFormat.cs
- PacketGenerator\Program.cs
- Server\ClientSession.cs
- copy
GenPacket.cs
and paste it
- copy
- DummyClient\ServerSession.cs
Test
batch file
- Create
DummyClient\Packet\GenPackets.cs
andServer\Packet\GenPackets.cs
- PacketGenerator\Program.cs
bin folder
- you can make your debug files on bin folder by setting
- PacketGenerator\PacketGenerator.csproj
batch file
- Common\Packet\GenPackets.bat
- XCOPY : copy file
- /Y : rewrite, if there is already the file
Packet Handler and Manager
-
make Packet case automatically
-
PacketGenerator\PacketFormat.cs
- Server\Packet\PacketHandler.cs
- set namespace to
Server
- set namespace to
- Server\Packet\PacketManager.cs
- set namespace to
Server
- set namespace to
- Server\ClientSession.cs
- Server\Program.cs
- DummyClient\ServerSession.cs
- Delete part of
GenPacket.cs
- Delete part of
Packet Manager
- PacketGenerator\PacketFormat.cs
- PacketGenerator\PDL.xml
C_
is for clientS_
is for server
- PacketGenerator\Program.cs
- Common\Packet\GenPackets.bat
- Server\PacketHandler.cs
- DummyClient\PacketHandler.cs