开发者

TcpListener invalid argument specified

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();
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜