Connect to multiple Tcp Servers
Posted on 2010-09-20
I want to connect to multiple TCP/IP servers at the same time.(Different IPs, same port)
When there is one server my code is like:
TcpClient = new TcpClient()
client.GetStream().BeginRead(readBuffer, 0, 1024, newAsyncCallback(GetFromServer), null);
Now for multiple servers do i need to create a TcpClient list ? Do i need to worry about thread safety ?
Frankly i could not decide how to design.