API Guides > ConceptRT 3.x
SocketUdp Class Reference

Socket udp. More...

Detailed Description

Socket udp.

+ Inheritance diagram for SocketUdp:

Protected Member Functions

bool Receive (PeerInfo &peerInfo, void *data, Int32 bufferSize, Int32 &dataSize, TimeSpan timeOut)
 Receives data. More...
 
void Send (PeerInfo &peerInfo, const void *data, Int32 dataSize)
 Send data. More...
 

Additional Inherited Members

- 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

bool Receive ( PeerInfo peerInfo,
void *  data,
Int32  bufferSize,
Int32 dataSize,
TimeSpan  timeOut 
)
protected

Receives data.

Parameters
peerInfo[in,out] Infos of remote peer.
data[in,out] The receive data buffer.
bufferSizeSize of the receive data buffer.
dataSize[in,out] Size of the received data.
timeOut(optional) the time out. Default = Infinite.
Returns
true if data received, false if timeout occurs.
void Send ( PeerInfo peerInfo,
const void *  data,
Int32  dataSize 
)
protected

Send data.

Parameters
peerInfo[in] Infos of target peer.
dataThe data buffer to send.
dataSizeSize of the data to send.