Share via


NetworkStream Constructor (Socket)

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Creates a new instance of the NetworkStream class for the specified Socket.

Namespace:  System.Net.Sockets
Assembly:  System (in System.dll)

Syntax

'Declaration
Public Sub New ( _
    socket As Socket _
)
public NetworkStream(
    Socket socket
)
public:
NetworkStream(
    Socket^ socket
)
new : 
        socket:Socket -> NetworkStream
public function NetworkStream(
    socket : Socket
)

Parameters

Remarks

The NetworkStream is created with read/write access to the specified Socket. The NetworkStream does not own the underlying Socket, so calling the Close method does not close the Socket.

.NET Framework Security

See Also

Reference

NetworkStream Class

NetworkStream Overload

System.Net.Sockets Namespace