TcpListener invalid argument specified
I'm not really sure what is wrong because I have tried the other method overload for TcpListener.Start(int backlog) but the same resu开发者_JS百科lt occurred. Maybe it is something wrong with how I initialized it?
Why are you specifying a host and port twice? Supplying them to the TcpListener
constructor should suffice:
public Station()
{
this.connections = new List<TcpClient>();
this.server = new TcpCient(IPAddress.Loopback, 6969);
}
public void Start()
{
server.Start();
}
精彩评论