Create multiple TCP Connections in C# then wait for data
Posted
by Ryan French
on Stack Overflow
See other posts from Stack Overflow
or by Ryan French
Published on 2010-03-03T03:43:07Z
Indexed on
2010/03/30
22:03 UTC
Read the original article
Hit count: 275
Hi Everyone,
I am currently creating a Windows Service that will create TCP connections to multiple machines (same socket on all machines) and then listen for 'events' from those machines. I am attempting to write the code to create a connection and then spawn a thread that listens to the connection waiting for packets from the machine, then decode the packets that come through, and call a function depending on the payload of the packet.
The problem is I'm not entirely sure how to do that in C#. Does anyone have any helpful suggestions or links that might help me do this?
Thanks in advance for any help!
© Stack Overflow or respective owner