23 _state_change_cb = state_change_cb;
35 return _socket->Send(buffer, length, 0) == (int) length;
45 _state_change_cb(_socket, old_state, new_state);
54 _state_change_cb = state_change_cb;
bool handleOut(const uint8_t *buffer, size_t length)
Handle output from libbgp. See libbgp document.
void notifyStateChange(int old_state, int new_state)
Handle state change notification from libbgp. See libbgp document.
Simple container class for FSM to send data to peer.
void setStateChangeCallback(Callback< void, Ptr< Socket >, int, int > state_change_cb)
Set callback to use when FSM change state.
BgpNs3SocketOut(Ptr< Socket > socket, Callback< void, Ptr< Socket >, int, int > state_change_cb)
Construct the container.