开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜