Is tcp listener and tcp server same thing in c#?
-
25-05-2021 - |
Domanda
What is the difference between TCP listener and TCP server? I want to communicate with some devices using TCP/IP protocol and want PC to organize the communication by using C#.
Soluzione
The .NET class TcpListener
implements a TCP server. That’s how the two terms are related. So if you want a TCP server in your application, use the TcpListener
.
Altri suggerimenti
Since you havent posted any specific context. i would refer you some tutorials you can use as a base for TCP communication in c#.
http://www.codeproject.com/Articles/155282/A-Complete-TCP-Server-Client-Communication-and-RMI
http://www.switchonthecode.com/tutorials/csharp-tutorial-simple-threaded-tcp-server
http://www.codeproject.com/Articles/5733/A-TCP-IP-Server-written-in-C
http://www.dreamincode.net/forums/topic/50259-tcp-client-connection/
the previous answer sites the difference.