In Sockets, how to remove the length prefix in Socket Packet Protocol
Code-wise开发者_高级运维, how do you remove the length prefix in SocketPacketProtocol.cs for Nito.Async and/or PacketProtcol for ordinary Sockets?
If your packets are fixed-size, then you can adapt PacketProtocol very easily.
If this is not the case, you'll have to roll your own solution. Nito.Async heavily relies on a length prefix to build a packet out of several "fragmented receives". If your protocol relies on other packet-delimitation methods i.e special sequence value, you'll have to change a lot of code.
精彩评论