-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Labels
Description
First evoked in https://groups.google.com/forum/#!topic/ns-3-users/tzG5TmweQp0
DCE overrides socket callbacks, for instance in UnixStreamSocketFd:
m_socket->SetAcceptCallback (MakeCallback (&UnixStreamSocketFd::ConnectionRequest, this),
MakeCallback (&UnixStreamSocketFd::ConnectionCreated, this));
m_socket->SetConnectCallback (MakeCallback (&UnixStreamSocketFd::ConnectionSuccess, this),
MakeCallback (&UnixStreamSocketFd::ConnectionError, this));
m_socket->SetCloseCallbacks (MakeCallback (&UnixStreamSocketFd::CloseSuccess, this),
MakeCallback (&UnixStreamSocketFd::CloseError, this));
m_state = (connected) ? CONNECTED : CREATED;
Thus how can the user script be warned when its ns3 socket got connected ?
I used a workaround here and added an extra callback but this does not feel clean: https://github.com/teto/ns-3-dce/blob/mptcp_tests/model/unix-stream-socket-fd.cc#L475