|
120 |
Callback<void, Ptr<Socket>, |
120 |
Callback<void, Ptr<Socket>, |
121 |
const Address&> newConnectionCreated, |
121 |
const Address&> newConnectionCreated, |
122 |
Callback<void, Ptr<Socket> > closeRequested); |
122 |
Callback<void, Ptr<Socket> > closeRequested); |
123 |
void SetSendCallback (Callback<void, Ptr<Socket>, uint32_t> dataSent); |
123 |
/** |
|
|
124 |
* \brief Notify application when a packet has been sent from transport |
125 |
* protocol (non-standard socket call) |
126 |
* \param dataSent Callback for the event that data is sent from the |
127 |
* underlying transport protocol. This callback is passed a |
128 |
* pointer to the socket, and the number of bytes sent. |
129 |
* \returns whether or not this socket supports this callback. Note |
130 |
* that this is a non-standard socket call. Some socket |
131 |
* implementations in ns-3 may not support this call, so the |
132 |
* user should check this return value to confirm that the |
133 |
* callback is supported. |
134 |
*/ |
135 |
virtual bool SetDataSentCallback (Callback<void, Ptr<Socket>, uint32_t> dataSent); |
136 |
/** |
137 |
* \brief Notify application when space in transmit buffer is added |
138 |
* |
139 |
* This callback is intended to notify a |
140 |
* socket that would have been blocked in a blocking socket model |
141 |
* that some data has been acked and removed from the transmit |
142 |
* buffer, and that it can call send again. The semantics for |
143 |
* reliable stream sockets are that when data is acked and removed |
144 |
* from the transmit buffer, this callback is invoked. |
145 |
* |
146 |
* \param sendCb Callback for the event that the socket transmit buffer |
147 |
* fill level has decreased. This callback is passed a pointer to |
148 |
* the socket, and the number of bytes available for writing |
149 |
* into the buffer (an absolute value). If there is no transmit |
150 |
* buffer limit, a maximum-sized integer is always returned. |
151 |
*/ |
152 |
void SetSendCallback (Callback<void, Ptr<Socket>, uint32_t> sendCb); |
124 |
/** |
153 |
/** |
125 |
* \brief Receive data |
154 |
* \brief Receive data |
126 |
* \param receivedData Invoked whenever new data is received. |
155 |
* \param receivedData Invoked whenever new data is received. |
|
232 |
void NotifyNewConnectionCreated (Ptr<Socket> socket, const Address &from); |
261 |
void NotifyNewConnectionCreated (Ptr<Socket> socket, const Address &from); |
233 |
void NotifyCloseRequested (void); |
262 |
void NotifyCloseRequested (void); |
234 |
void NotifyDataSent (uint32_t size); |
263 |
void NotifyDataSent (uint32_t size); |
|
|
264 |
void NotifySend (uint32_t spaceAvailable); |
235 |
void NotifyDataReceived (Ptr<Packet> p, const Address &from); |
265 |
void NotifyDataReceived (Ptr<Packet> p, const Address &from); |
236 |
|
266 |
|
237 |
Callback<void,Ptr<Socket> > m_closeCompleted; |
267 |
Callback<void,Ptr<Socket> > m_closeCompleted; |
|
242 |
Callback<bool, Ptr<Socket>, const Address &> m_connectionRequest; |
272 |
Callback<bool, Ptr<Socket>, const Address &> m_connectionRequest; |
243 |
Callback<void, Ptr<Socket>, const Address&> m_newConnectionCreated; |
273 |
Callback<void, Ptr<Socket>, const Address&> m_newConnectionCreated; |
244 |
Callback<void, Ptr<Socket>, uint32_t> m_dataSent; |
274 |
Callback<void, Ptr<Socket>, uint32_t> m_dataSent; |
|
|
275 |
Callback<void, Ptr<Socket>, uint32_t > m_sendCb; |
245 |
Callback<void, Ptr<Socket>, Ptr<Packet>,const Address&> m_receivedData; |
276 |
Callback<void, Ptr<Socket>, Ptr<Packet>,const Address&> m_receivedData; |
246 |
}; |
277 |
}; |
247 |
|
278 |
|