System::Net::Sockets::TcpListener::TcpListener 构造函数

TcpListener::TcpListener(int32_t) constructor

构造一个新实例。

System::Net::Sockets::TcpListener::TcpListener(int32_t port)
参数类型描述
portint32_t用于监听的端口号。

另见

TcpListener::TcpListener(System::SharedPtr<IPAddress>, int32_t) constructor

构造一个新实例。

System::Net::Sockets::TcpListener::TcpListener(System::SharedPtr<IPAddress> localaddr, int32_t port)
参数类型描述
localaddrSystem::SharedPtr<IPAddress>本地 IP 地址。
portint32_t用于监听的端口号。

另见

TcpListener::TcpListener(System::SharedPtr<IPEndPoint>) constructor

构造一个新实例。

System::Net::Sockets::TcpListener::TcpListener(System::SharedPtr<IPEndPoint> localEP)
参数类型描述
localEPSystem::SharedPtr<IPEndPoint>监听套接字必须绑定的本地端点。

另见