Hi Martin,
I am just beginning to learn about the TcpListener and TcpClient and Socket.
I have figured out the TcpListener, it is used for booth in and outgoing requests, right?
TcpListener is used to establish incoming connections. From a TcpListener you can accept either a Socket or TcpClient (your choice)
that you can use for two-way communication.
But when to use the TcpClient and when to use the Socket?
You can use either a TcpClient or Socket on a client machine to connect to a host that is using a TcpListener. On the client, you
create the TcpClient or Socket. On the server, the TcpListener creates one for each incoming connection. Just accept the
implementation that you want to use.
As Nicholas said, use should probably use a TcpClient, on both the client and server. There really is no reason not to since it
exposes the Socket anyway and it wraps some common implementation details too.
HTH
--
- Dave Sexton