IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Protected Member Functions | Friends | List of all members
ipsdk::tcpip::CollPeersCB Class Reference

Callback class, intended to be used by CollPeers class, and whose methods will be called each time an event associated to CollPeers occurs The user has to inherit from this class if he wants to specify a given behaviour in reaction to these events. More...

#include <CollPeersCB.h>

Inheritance diagram for ipsdk::tcpip::CollPeersCB:
CliCollPeersCB ipsdk::core::SocketsPoolCB SvrCollPeersCB

Public Member Functions

Constructors and destructors
 CollPeersCB ()
 
virtual ~CollPeersCB ()
 

Protected Member Functions

virtual void onConnected (const SocketDesc &socketDesc)
 method called each time a new incoming connection is accepted, or a an outcoming connection is established More...
 
virtual void onListenFailed (ipsdk::ipUInt16 acceptorId, const boost::system::error_code &ec)
 
virtual void onConnectionFailed (const Guid &peerId, const EndPoint &remoteEndPoint, const boost::system::error_code &ec)
 
virtual void onDeliveryFailed (const Guid &peerId, ipUInt64 nDeliveryId)
 method called each time a delivery request fails More...
 
virtual void onDelivered (const SocketDesc &socketDesc, ipUInt64 nDeliveryId)
 method called each time a delivery request succeeds More...
 
virtual void onRead (const SocketDesc &socketDesc, const SerializationObjectPtr pObj)
 method called each time a new object has been read through a connection More...
 
virtual void onConnectionLost (const SocketDesc &socketDesc, const boost::system::error_code &ec)
 method called each time an active connection is broken More...
 
virtual void onConnectionClosed (const Guid &peerId, bool bOnUserRequest)
 method called when a connection is closed (follows a server connection break, or a user close request) More...
 

Friends

class CollPeers
 

Detailed Description

Callback class, intended to be used by CollPeers class, and whose methods will be called each time an event associated to CollPeers occurs The user has to inherit from this class if he wants to specify a given behaviour in reaction to these events.

Author
H. Delestre
Date
2013/12/2

Member Function Documentation

◆ onConnected()

virtual void ipsdk::tcpip::CollPeersCB::onConnected ( const SocketDesc socketDesc)
inlineprotectedvirtual

method called each time a new incoming connection is accepted, or a an outcoming connection is established

Parameters
socketDescdescription of the connection (id. + endpoints)

Reimplemented in CliCollPeersCB, and ipsdk::core::SocketsPoolCB.

◆ onListenFailed()

virtual void ipsdk::tcpip::CollPeersCB::onListenFailed ( ipsdk::ipUInt16  acceptorId,
const boost::system::error_code &  ec 
)
inlineprotectedvirtual

method called when an incoming connection is refused, or when a listen operation is aborted

Parameters
acceptorIdlisten port on which the connection has been refused
ecset to indicate what error occurred

Reimplemented in CliCollPeersCB, SvrCollPeersCB, and ipsdk::core::SocketsPoolCB.

◆ onConnectionFailed()

virtual void ipsdk::tcpip::CollPeersCB::onConnectionFailed ( const Guid peerId,
const EndPoint remoteEndPoint,
const boost::system::error_code &  ec 
)
inlineprotectedvirtual

method called when an outcoming connection request fails

Parameters
peerIdidentifier of the connection
remoteEndPointremote endpoint
ecset to indicate what error occurred

Reimplemented in CliCollPeersCB, SvrCollPeersCB, and ipsdk::core::SocketsPoolCB.

◆ onDeliveryFailed()

virtual void ipsdk::tcpip::CollPeersCB::onDeliveryFailed ( const Guid peerId,
ipUInt64  nDeliveryId 
)
inlineprotectedvirtual

method called each time a delivery request fails

Parameters
peerIdidentifier of the connection
nDeliveryIdidentifier of the delivery request

Reimplemented in CliCollPeersCB, SvrCollPeersCB, and ipsdk::core::SocketsPoolCB.

◆ onDelivered()

virtual void ipsdk::tcpip::CollPeersCB::onDelivered ( const SocketDesc socketDesc,
ipUInt64  nDeliveryId 
)
inlineprotectedvirtual

method called each time a delivery request succeeds

Parameters
socketDescdescription of the connection (id. + endpoints)
nDeliveryIdidentifier of the delivery request

Reimplemented in ipsdk::core::SocketsPoolCB.

◆ onRead()

virtual void ipsdk::tcpip::CollPeersCB::onRead ( const SocketDesc socketDesc,
const SerializationObjectPtr  pObj 
)
inlineprotectedvirtual

method called each time a new object has been read through a connection

Parameters
socketDescdescription of the connection (id. + endpoints)
pObjread object

Reimplemented in CliCollPeersCB, SvrCollPeersCB, and ipsdk::core::SocketsPoolCB.

◆ onConnectionLost()

virtual void ipsdk::tcpip::CollPeersCB::onConnectionLost ( const SocketDesc socketDesc,
const boost::system::error_code &  ec 
)
inlineprotectedvirtual

method called each time an active connection is broken

Parameters
socketDescdescription of the connection (id. + endpoints)
ecset to indicate what error occurred
Note
if ec == boost::system::error_code(), the connection break is caused by a user close request

Reimplemented in ipsdk::core::SocketsPoolCB.

◆ onConnectionClosed()

virtual void ipsdk::tcpip::CollPeersCB::onConnectionClosed ( const Guid peerId,
bool  bOnUserRequest 
)
inlineprotectedvirtual

method called when a connection is closed (follows a server connection break, or a user close request)

Parameters
peerIdidentifier of the peer
bOnUserRequestif true, connection was closed because of a user request

Reimplemented in ipsdk::core::SocketsPoolCB.


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