Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

TcpClient::Client Property

 

Gets or sets the underlying Socket.

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

public:
property Socket^ Client {
	Socket^ get();
	void set(Socket^ value);
}

Property Value

Type: System.Net.Sockets::Socket^

The underlying network Socket.

TcpClient creates a Socket to send and receive data over a network. Classes deriving from TcpClient can use this property to get or set this Socket. Use the underlying Socket returned from Client if you require access beyond that which TcpClient provides. You can also use Client to set the underlying Socket to an existing Socket. This might be useful if you want to take advantage of the simplicity of TcpClient using a pre-existing Socket.

The following code example demonstrates the use of the Client property. In this example, the receive buffer size of the underlying Socket is changed.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show:
© 2017 Microsoft