1

I develop a some socket bridge between C# server and node.js client.

Firstly, I thought to use legacy TCP/IP socket, but on second thought websocket is way too easier in async style programming of node.

XSockets.NET looks good and clean, and I will use it as a websocket server.

I know ws is widely used for fundamental websocket layer for node, but we have socket.io or engine.io. I wonder if socket.io-client is a proper choice as a socket client, and want to double check what I miss.

Do you have any other option in this case?

Perhaps, any abstract layer is not needed, and I should use only ws..

Thanks!

1 Answers1

0

If you are using XSockets.NET as a server you can connect any socket to the server. You do not have to talk websockets. You can actually use the Node.JS socket to connect and send data.

The trick to do so is to implement a custom protocol. As long as you send JSON it is very simple. Just inherit create a new protocol from the protocol-template provided by XSockets.NET

These short demos might explain more in detail:

EDIT: If you are just getting started with the project I would recomend you to join the group that test XSockets.NET 4.0 The next gen of XSockets is much much improved over the 3.* versions. Just send a mail to contact@xsockets.net if you want in!

Uffe
  • 2,275
  • 1
  • 13
  • 9
  • Thanks for the interesting input, Uffe. You must be a core developer of XSocket.NET. Impressive work in fact. Lately, I do too much on node.js so I almost forgot how to code in C# :). Could you tell me a way to implement event: http://stackoverflow.com/questions/24573079/xsocket-net-server-onopen-event-implementation , if possible. Thanks! –  Jul 04 '14 at 11:21
  • Yes (and thanks), I am one of the XSockets developers. I will look at the SO question you linked and answer it, but it will happen tomorrow. Friday night now and I am watching some sports. Stay tuned! :) – Uffe Jul 04 '14 at 21:05
  • Thanks Uffe. actually problem solved. Please see the question link if you would like. Regards. –  Jul 05 '14 at 04:31