API Guides > ConceptRT 3.x
SocketTcpClient Class Reference

Socket tcp client. More...

Detailed Description

Socket tcp client.

+ Inheritance diagram for SocketTcpClient:

Public Member Methods

bool TryOpen (PCChar8 hostName, Int32 port, String &errorMessage)
 Try to open the socket. More...
 
void Open (PCChar8 hostName, Int32 port)
 Opens. More...
 
- Public Member Methods inherited from SocketTcp
bool Receive (void *data, Int32 bufferSize, Int32 &dataSize, TimeSpan timeOut=TimeInfinite)
 Receives data. More...
 
bool Send (const void *data, Int32 dataSize, Int32 &dataSent)
 Send data. More...
 
bool ReceiveBuffer (void *data, Int32 dataSize, TimeSpan timeOut=TimeInfinite)
 Receive a buffer. More...
 
bool SendBuffer (const void *data, Int32 dataSize)
 Sends a buffer. More...
 
- Public Member Methods inherited from Socket
 Socket ()
 Default constructor. More...
 
virtual ~Socket ()
 Destructor. More...
 
void Close ()
 Closes this object. More...
 
bool IsOpen () const
 Query if the socket is open. More...
 
PCChar8 GetHostName () const
 Gets the host name. More...
 
Int32 GetPort () const
 Gets the port. More...
 
const PeerInfoGetPeerInfo () const
 Gets the peer information. More...
 
void SetOption (SocketOption option, bool value)
 Sets an option. More...
 

Methods Documentation

void Open ( PCChar8  hostName,
Int32  port 
)

Opens.

Parameters
hostNameName of the host.
portThe port.

Will raise an exception if failed. See TryOpen.

bool TryOpen ( PCChar8  hostName,
Int32  port,
String errorMessage 
)

Try to open the socket.

Parameters
hostNameName of the host.
portThe port.
errorMessage[in,out] Message describing the error.
Returns
true if it succeeds, false if it fails.