Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simple and fast async binary TCP socket server? [closed]

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#.

  • XYNetSocket - single file, unreliable and misses packets, does not support binary
  • NetSockets
  • SocketAsyncEventArgs
  • SuperSocket - looks very bloated (100+ classes)

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

like image 703
Robin Rodricks Avatar asked Feb 21 '13 18:02

Robin Rodricks


1 Answers

Some people might tell you to create everything from scratch yourself, which I don't really understand as, like you say, its WAY faster and easier to use a library.

Using networkComms.net, assuming you would send your binary data as byte[], Simple client server example - here. WPF chat example - here. In both examples instead of sending and receiving strings you replace relevant sections with byte[]. 'Relevant' should be apparent based on the examples and included comments.

I have to add that I'm a developer for this library.

like image 185
MarcF Avatar answered Sep 27 '22 19:09

MarcF