System::Net::Sockets::TcpClient class
Contents
[
Hide
]TcpClient class
Represents a client for the TCP network services. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.
class TcpClient : public System::IDisposable
Methods
Method | Description |
---|---|
BeginConnect(String, int32_t, AsyncCallback, System::SharedPtr<Object>) | Initiates an asynchronous connect operation. |
BeginConnect(System::SharedPtr<IPAddress>, int32_t, AsyncCallback, System::SharedPtr<Object>) | Initiates an asynchronous connect operation. |
BeginConnect(System::ArrayPtr<System::SharedPtr<IPAddress>>, int32_t, AsyncCallback, System::SharedPtr<Object>) | Initiates an asynchronous connect operation. |
Close() | Closes the connection and disposes the current instance. |
Connect(String, int32_t) | Establishes a connection to the specified remote host. |
Connect(System::SharedPtr<IPAddress>, int32_t) | Establishes a connection to the specified remote host. |
Connect(System::SharedPtr<IPEndPoint>) | Establishes a connection to the specified remote host. |
Connect(System::ArrayPtr<System::SharedPtr<IPAddress>>, int32_t) | Establishes a connection to the specified remote host. |
EndConnect(System::SharedPtr<IAsyncResult>) | Waits until the specified asynchronous connect operation completes. |
get_Available() | Returns the number of bytes that are received and ready to read. |
get_Client() | RTTI information. |
get_Connected() | Returns a value that indicates if the socket is connected to the remote host. |
get_ExclusiveAddressUse() | Gets a value that indicates if the current instance allows only one client to use a port. |
get_LingerState() | Gets a value that indicates if the socket will delay closing in an attempt to send all pending data. |
get_NoDelay() | Gets a value that indicates if the current instance is using the Nagle algorithm. |
get_ReceiveBufferSize() | Gets the size of the buffer that is used for receiving data. |
get_ReceiveTimeout() | Gets a value that indicates an amount of time after which data receiving will time out. |
get_SendBufferSize() | Gets the size of the buffer that is used for sending data. |
get_SendTimeout() | Gets a value that indicates an amount of time after which data sending will time out. |
GetStream() | Returns the stream that is used for sending and receiving data. |
set_Client(System::SharedPtr<Socket>) | Sets the socket. |
set_ExclusiveAddressUse(bool) | Sets a value that indicates if the current instance allows only one client to use a port. |
set_LingerState(System::SharedPtr<LingerOption>) | Sets a value that indicates if the socket will delay closing in an attempt to send all pending data. |
set_NoDelay(bool) | Sets a value that indicates if the current instance is using the Nagle algorithm. |
set_ReceiveBufferSize(int32_t) | Sets the size of the buffer that is used for receiving data. |
set_ReceiveTimeout(int32_t) | Sets a value that indicates an amount of time after which data receiving will time out. |
set_SendBufferSize(int32_t) | Sets the size of the buffer that is used for sending data. |
set_SendTimeout(int32_t) | Sets a value that indicates an amount of time after which data sending will time out. |
TcpClient(System::SharedPtr<IPEndPoint>) | Constructs a new instance. |
TcpClient() | Constructs a new instance. |
TcpClient(AddressFamily) | Constructs a new instance. |
TcpClient(String, int32_t) | Constructs a new instance. |
virtual ~TcpClient() | Destructs the current instance. |
See Also
- Class IDisposable
- Namespace System::Net::Sockets
- Library Aspose.PUB for C++