0

I am developing an application which will open TCP/IP sockets to remote locations. For each of these connections, messages will flow in both directions asynchronously. There isn't any request-response behavior.

I've been looking at NetMQ and I like the way it manages the connecting and listening of sockets as well as the way it does the frames. But I don't see how it can work with a remote endpoint that doesn't run NetMQ.

Would defining my own socket type work? e.g. public class MyNetMQSocket: NetMQSocket

Cakemeister
  • 191
  • 2
  • 6
  • 1
    You can use NetMQ Stream socket which is exactly for that. Use the bind and connect, it behaves like a router, but the wire is tcp, the other side can be regular tcp socket. – somdoron Feb 22 '20 at 08:32
  • I wrote some code to use the StreamSocket, but I am getting some strange behavior, I will post the code. – Cakemeister Feb 25 '20 at 15:42
  • By "strange behavior" I mean that nothing is received and that TrySend appears to sometimes succeed even when the remote end is not connected. – Cakemeister Feb 25 '20 at 22:43
  • The first frame of Stream socket is the routing id, very similar to the router socket. – somdoron Feb 26 '20 at 16:05

0 Answers0