6

I'm looking for a simple and fast TCP socket server written in C#. It should be async (run alongside a WinForms app) and support async receiving/sending data to connected clients. I found the following libraries that might work, but I'm looking for advice on specific libraries.

I'm trying to send binary data (using my custom serializer) from C# to an AS3 frontend. I have the client socket already written in AS3 but I need a reliable socket server in C#.

Which socket server library have you used with success? Does it support binary and is it reliable?

4

1 回答 1

8

有些人可能会告诉您自己从头开始创建所有内容,我并不真正理解,就像您说的那样,使用库更快更容易。

使用 networkComms.net,假设您将二进制数据作为 byte[] 发送,简单的客户端服务器示例 -这里。WPF 聊天示例 -这里。在这两个示例中,您将相关部分替换为 byte[],而不是发送和接收字符串。根据示例和包含的评论,“相关”应该是显而易见的。

我必须补充一点,我是这个库的开发人员。

于 2013-02-21T18:10:39.830 回答