TcpClient Class

Represents a client-side socket connection that provides a NetworkByteStream .

The stream can be read and written to directly, or it can be passed to a StreamReader and/or to a StreamWriter for text I/O, or to BinaryReader and/or BinaryWriter for binary I/O.

Definition

Line 11 of System.Net.Sockets/TcpClient.cm

Constructors & Destructor

public TcpClient()
public nothrow TcpClient(TcpSocket&& socket_)
public TcpClient(const String<char>& node, const String<char>& service)
public TcpClient(const String<char>& node, const String<char>& service, ConnectOptions options)

Member Functions

public void Close()
public void Connect(const String<char>& node, const String<char>& service)
public void Connect(const String<char>& node, const String<char>& service, ConnectOptions options)
public TcpSocket& ContainedSocket()
public SharedPtr<ByteStream> GetStream()

Member Variables

private TcpSocket socket

Constructor& Destructor Details

TcpClient Constructor

public TcpClient()

Definition
Line 13 of System.Net.Sockets/TcpClient.cm


TcpClient Constructor

public nothrow TcpClient(TcpSocket&& socket_)

Definition
Line 22 of System.Net.Sockets/TcpClient.cm


TcpClient Constructor

public TcpClient(const String<char>& node, const String<char>& service)

Definition
Line 16 of System.Net.Sockets/TcpClient.cm


TcpClient Constructor

public TcpClient(const String<char>& node, const String<char>& service, ConnectOptions options)

Definition
Line 19 of System.Net.Sockets/TcpClient.cm


Member Function Details

Close Member Function

public void Close()

Definition
Line 25 of System.Net.Sockets/TcpClient.cm


Connect Member Function

public void Connect(const String<char>& node, const String<char>& service)

Definition
Line 29 of System.Net.Sockets/TcpClient.cm


Connect Member Function

public void Connect(const String<char>& node, const String<char>& service, ConnectOptions options)

Definition
Line 33 of System.Net.Sockets/TcpClient.cm


ContainedSocket Member Function

public TcpSocket& ContainedSocket()

Definition
Line 42 of System.Net.Sockets/TcpClient.cm


GetStream Member Function

public SharedPtr<ByteStream> GetStream()

Definition
Line 38 of System.Net.Sockets/TcpClient.cm