#include <ControllerStateChangedCallback.hpp>
Inheritance diagram for CarobNS::SocketKillerCallback:
Public Member Functions | |
SocketKillerCallback (AbstractControllerPool &p) | |
Policy is needed to inform about controller status changes. | |
~SocketKillerCallback () | |
Clears constrollers and socket lists. | |
void | onControllerDown (const ControllerInfo &ctrl) |
Kills sockets associated to the given controller. | |
void | onControllerUp (const ControllerInfo &ctrl) |
Just informs policy that a controller came back. | |
void | registerSocket (const ControllerInfo &ctrl, JavaSocket *socketFd) |
Adds the given socket to the list of monitored sockets for given controller. | |
void | unRegisterSocket (const ControllerInfo &ctrl, JavaSocket *socket) |
Removes the given socket from the list of monitored sockets for a given controller. |
Holds lists of socket file descriptors associated to a controller. Upon controller failure detection, this list of sockets will be killed to allow driver failover
void CarobNS::SocketKillerCallback::unRegisterSocket | ( | const ControllerInfo & | ctrl, | |
JavaSocket * | socket | |||
) |
Removes the given socket from the list of monitored sockets for a given controller.
This function should be called when socket creation or connection failed
ctrl | controller to which given socket was connected | |
socket | the socket to un register |