ClanLib  2.3.7
List of all members
CL_UDPSocket Class Reference

UDP socket. More...

#include <udp_socket.h>

Public Member Functions

Construction
 CL_UDPSocket ()
 
 CL_UDPSocket (const CL_SocketName &local_name, bool force_bind=true)
 Constructs a UDPSocket. More...
 
 CL_UDPSocket (int socket, bool close_socket)
 Constructs a UDPSocket. More...
 
 ~CL_UDPSocket ()
 
Attributes
int get_handle () const
 Get Handle. More...
 
CL_SocketName get_local_name () const
 Get Local name. More...
 
CL_Event get_read_event ()
 Get Read event. More...
 
CL_Event get_write_event ()
 Get Write event. More...
 
Operations
void bind (const CL_SocketName &local_name, bool force_bind=true)
 Bind. More...
 
void set_handle (int socket, bool close_socket)
 Set handle. More...
 
int send (const void *data, int len, const CL_SocketName &to)
 Send. More...
 
int receive (void *data, int len, CL_SocketName &out_from)
 Receive. More...
 
int peek (void *data, int len, CL_SocketName &out_from)
 Peek. More...
 

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: