Thread portable class


Gate portable class


Timer class


Pool class


Terimber 2.0


About C++


Downloads Products & Services Support Clients Open Source About



Home / Open source / Terimber 2.0

terimber_aiosock_callback Class Reference

abstract interface aiosock callbacks More...

#include <aiosockfactory.h>

Inheritance diagram for terimber_aiosock_callback:

aiogate msg_sock_connection msg_sock_listener

List of all members.

Public Member Functions

virtual ~terimber_aiosock_callback ()
 destructor
virtual void v_on_error (size_t handle, int err, aiosock_type mask, void *userdata)=0
 port will call function after error occured
virtual void v_on_connect (size_t handle, const sockaddr_in &peeraddr, void *userdata)=0
 port will call function after successfully connecting to socket
virtual void v_on_send (size_t handle, void *buf, size_t requested, size_t processed, const sockaddr_in &peeraddr, void *userdata)=0
 port will call function after successfully sending buffer to socket
virtual void v_on_receive (size_t handle, void *buf, size_t requested, size_t processed, const sockaddr_in &peeraddr, void *userdata)=0
 port will call function after successfully receiving buffer from socket
virtual void v_on_accept (size_t handle, size_t handle_accepted, terimber_aiosock_callback *&callback, const sockaddr_in &peeraddr, void *userdata)=0
 port will call function after successfully accepting the new incoming connection user can change the callback, by default it's an object which created a listener


Detailed Description

abstract interface aiosock callbacks

Definition at line 45 of file aiosockfactory.h.


Constructor & Destructor Documentation

virtual terimber_aiosock_callback::~terimber_aiosock_callback (  )  [inline, virtual]

destructor

Definition at line 50 of file aiosockfactory.h.


Member Function Documentation

virtual void terimber_aiosock_callback::v_on_error ( size_t  handle,
int  err,
aiosock_type  mask,
void *  userdata 
) [pure virtual]

port will call function after error occured

Parameters:
handle  socket handle
err  error code
mask  reason
userdata  user defined data

Implemented in aiogate, msg_sock_connection, and msg_sock_listener.

Referenced by aiosock::process_timeouted_blocks(), and aiosock::v_do_job().

virtual void terimber_aiosock_callback::v_on_connect ( size_t  handle,
const sockaddr_in &  peeraddr,
void *  userdata 
) [pure virtual]

port will call function after successfully connecting to socket

Parameters:
handle  socket handle
peeraddr  peer address
userdata  user defined data

Implemented in aiogate, msg_sock_connection, and msg_sock_listener.

Referenced by aiosock::v_do_job().

virtual void terimber_aiosock_callback::v_on_send ( size_t  handle,
void *  buf,
size_t  requested,
size_t  processed,
const sockaddr_in &  peeraddr,
void *  userdata 
) [pure virtual]

port will call function after successfully sending buffer to socket

Parameters:
handle  socket handle
buf  buffer for sending
requested  requested bytes to send
processed  actually sent bytes
peeraddr  peer address
userdata  user defined data

Implemented in aiogate, msg_sock_connection, and msg_sock_listener.

Referenced by aiosock::v_do_job().

virtual void terimber_aiosock_callback::v_on_receive ( size_t  handle,
void *  buf,
size_t  requested,
size_t  processed,
const sockaddr_in &  peeraddr,
void *  userdata 
) [pure virtual]

port will call function after successfully receiving buffer from socket

Parameters:
handle  socket handle
buf  buffer for receiving
requested  requested bytes for receive
processed  actually received bytes
peeraddr  peer address
userdata  user defined data

Implemented in aiogate, msg_sock_connection, and msg_sock_listener.

Referenced by aiosock::v_do_job().

virtual void terimber_aiosock_callback::v_on_accept ( size_t  handle,
size_t  handle_accepted,
terimber_aiosock_callback *&  callback,
const sockaddr_in &  peeraddr,
void *  userdata 
) [pure virtual]

port will call function after successfully accepting the new incoming connection user can change the callback, by default it's an object which created a listener

Parameters:
handle  listener socket handle
handle_accepted  accepted socket handle
callback  callback for processing further actions
peeraddr  peer address
userdata  user defined data

Implemented in aiogate, msg_sock_connection, and msg_sock_listener.

Referenced by aiosock::v_do_job().


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


© Copyright Terimber 2003-.