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_aiogate_pin Class Reference

class abstraction for pin object user has to implement the code More...

#include <aiogatefactory.h>

List of all members.

Public Member Functions

virtual ~terimber_aiogate_pin ()
 destructor
virtual void on_accept (const sockaddr_in &local, const sockaddr_in &remote, size_t ident, terimber_aiogate *callback)=0
 accepts the new incoming pin
virtual void on_connect (const sockaddr_in &local, const sockaddr_in &remote, size_t ident, terimber_aiogate *callback)=0
 connects to the new pin
virtual void on_bind (const sockaddr_in &local, size_t ident, terimber_aiogate *callback)=0
 connect to the new UDP pin
virtual bool on_recv (const void *buf, size_t len, const sockaddr_in &peeraddr, bool &expected_more)=0
 aiogate calls this callback when bytes have come from peer
virtual void on_send (const sockaddr_in &peeraddr)=0
 aiogate invokes this callback only if all bytes have been sent
virtual void on_close (ub4_t mask)=0
 aiogate invokes this function when pin connection is deactivate


Detailed Description

class abstraction for pin object user has to implement the code

Definition at line 65 of file aiogatefactory.h.


Constructor & Destructor Documentation

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

destructor

Definition at line 69 of file aiogatefactory.h.


Member Function Documentation

virtual void terimber_aiogate_pin::on_accept ( const sockaddr_in &  local,
const sockaddr_in &  remote,
size_t  ident,
terimber_aiogate callback 
) [pure virtual]

accepts the new incoming pin

Parameters:
local  ip/port of this pin
remote  ip/port of remote peer
ident  unique ident for this pin will be used with the following callback
callback  aiogate itself

Referenced by aiogate::v_on_accept().

virtual void terimber_aiogate_pin::on_connect ( const sockaddr_in &  local,
const sockaddr_in &  remote,
size_t  ident,
terimber_aiogate callback 
) [pure virtual]

connects to the new pin

Parameters:
local  ip/port of this pin
remote  ip/port of remote peer
ident  unique ident for this pin will be used with the following callback
callback  aiogate itself

Referenced by aiogate::v_on_connect().

virtual void terimber_aiogate_pin::on_bind ( const sockaddr_in &  local,
size_t  ident,
terimber_aiogate callback 
) [pure virtual]

connect to the new UDP pin

Parameters:
local  ip/port of this pin
ident  unique ident for this pin will be used with the following callback
callback  aiogate itself

Referenced by aiogate::bind().

virtual bool terimber_aiogate_pin::on_recv ( const void *  buf,
size_t  len,
const sockaddr_in &  peeraddr,
bool &  expected_more 
) [pure virtual]

aiogate calls this callback when bytes have come from peer

Parameters:
buf  array of received bytes
len  the length of array of bytes
peeraddr  peer address
expected_more  tip for aiogate to use a big chunk of memory instead of small buffer

Referenced by aiogate::v_on_receive().

virtual void terimber_aiogate_pin::on_send ( const sockaddr_in &  peeraddr  )  [pure virtual]

aiogate invokes this callback only if all bytes have been sent

Parameters:
peeraddr  peer address

Referenced by aiogate::v_on_send().

virtual void terimber_aiogate_pin::on_close ( ub4_t  mask  )  [pure virtual]

aiogate invokes this function when pin connection is deactivate

Parameters:
mask  reason for closure

Referenced by aiogate::final_close().


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


© Copyright Terimber 2003-.