CL_UDPSocket Class Reference
[clanNetwork Socket]

UDP socket. More...

#include <udp_socket.h>

List of all members.

Public Member Functions

Construction

 CL_UDPSocket ()
 CL_UDPSocket (const CL_SocketName &local_name, bool force_bind=true)
 Constructs a UDPSocket.
 CL_UDPSocket (int socket, bool close_socket)
 Constructs a UDPSocket.
 ~CL_UDPSocket ()
Attributes

int get_handle () const
 Get Handle.
CL_SocketName get_local_name () const
 Get Local name.
CL_Event get_read_event ()
 Get Read event.
CL_Event get_write_event ()
 Get Write event.
Operations

void bind (const CL_SocketName &local_name, bool force_bind=true)
 Bind.
void set_handle (int socket, bool close_socket)
 Set handle.
int send (const void *data, int len, const CL_SocketName &to)
 Send.
int receive (void *data, int len, CL_SocketName &out_from)
 Receive.
int peek (void *data, int len, CL_SocketName &out_from)
 Peek.

Detailed Description

UDP socket.


Constructor & Destructor Documentation

CL_UDPSocket::CL_UDPSocket (  ) 
CL_UDPSocket::CL_UDPSocket ( const CL_SocketName local_name,
bool  force_bind = true 
)

Constructs a UDPSocket.

Parameters:
local_name = Socket Name
force_bind = bool
CL_UDPSocket::CL_UDPSocket ( int  socket,
bool  close_socket 
)

Constructs a UDPSocket.

Parameters:
socket = value
close_socket = bool
CL_UDPSocket::~CL_UDPSocket (  ) 

Member Function Documentation

void CL_UDPSocket::bind ( const CL_SocketName local_name,
bool  force_bind = true 
)

Bind.

Parameters:
local_name = Socket Name
force_bind = bool
int CL_UDPSocket::get_handle (  )  const

Get Handle.

Returns:
handle
CL_SocketName CL_UDPSocket::get_local_name (  )  const

Get Local name.

Returns:
local_name
CL_Event CL_UDPSocket::get_read_event (  ) 

Get Read event.

Returns:
read_event
CL_Event CL_UDPSocket::get_write_event (  ) 

Get Write event.

Returns:
write_event
int CL_UDPSocket::peek ( void *  data,
int  len,
CL_SocketName out_from 
)

Peek.

Parameters:
data = void
len = value
out_from = Socket Name
Returns:
int
int CL_UDPSocket::receive ( void *  data,
int  len,
CL_SocketName out_from 
)

Receive.

Parameters:
data = void
len = value
out_from = Socket Name
Returns:
int
int CL_UDPSocket::send ( const void *  data,
int  len,
const CL_SocketName to 
)

Send.

Parameters:
data = void
len = value
to = Socket Name
Returns:
int
void CL_UDPSocket::set_handle ( int  socket,
bool  close_socket 
)

Set handle.

Parameters:
socket = value
close_socket = bool

The documentation for this class was generated from the following file: