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

NetworkStream::NetworkStream(System::SharedPtr<System::Net::Sockets::Socket>) constructor

构造一个新实例。

System::Net::Sockets::NetworkStream::NetworkStream(System::SharedPtr<System::Net::Sockets::Socket> socket)
参数类型描述
套接字System::SharedPtr<System::Net::Sockets::Socket>用于发送和接收数据的套接字。

另见

NetworkStream::NetworkStream(System::SharedPtr<System::Net::Sockets::Socket>, bool) constructor

构造一个新实例。

System::Net::Sockets::NetworkStream::NetworkStream(System::SharedPtr<System::Net::Sockets::Socket> socket, bool ownsSocket)
参数类型描述
套接字System::SharedPtr<System::Net::Sockets::Socket>用于发送和接收数据的套接字。
ownsSocketbool一个值,用于指示当该值为 true 时,当前实例是否获取对指定套接字的所有权。

另见

NetworkStream::NetworkStream(System::SharedPtr<System::Net::Sockets::Socket>, System::IO::FileAccess, bool) constructor

构造一个新实例。

System::Net::Sockets::NetworkStream::NetworkStream(System::SharedPtr<System::Net::Sockets::Socket> socket, System::IO::FileAccess access, bool ownsSocket)
参数类型描述
套接字System::SharedPtr<System::Net::Sockets::Socket>用于发送和接收数据的套接字。
访问System::IO::FileAccess指定在指定套接字上分配给实例的访问类型。
ownsSocketbool一个值,用于指示当该值为 true 时,当前实例是否获取对指定套接字的所有权。

另见