|
|
| 177 |
virtual int Send (Ptr<Packet> p) = 0; |
177 |
virtual int Send (Ptr<Packet> p) = 0; |
| 178 |
|
178 |
|
| 179 |
/** |
179 |
/** |
|
|
180 |
* \brief Send data (or dummy data) to the remote host |
| 181 |
* \param buf A pointer to a raw byte buffer of some data to send. If this |
| 182 |
* is 0, we send dummy data whose size is specified by the second parameter |
| 183 |
* \param size the number of bytes to copy from the buffer |
| 184 |
* |
| 185 |
* This is provided so as to have an API which is closer in appearance |
| 186 |
* to that of real network or BSD sockets. |
| 187 |
*/ |
| 188 |
int Send (const uint8_t* buf, uint32_t size); |
| 189 |
|
| 190 |
/** |
| 180 |
* \brief Send data to a specified peer. |
191 |
* \brief Send data to a specified peer. |
| 181 |
* \param address IP Address of remote host |
192 |
* \param address IP Address of remote host |
| 182 |
* \param p packet to send |
193 |
* \param p packet to send |
|
|
| 184 |
* internal buffer and accepted for transmission. |
195 |
* internal buffer and accepted for transmission. |
| 185 |
*/ |
196 |
*/ |
| 186 |
virtual int SendTo(const Address &address,Ptr<Packet> p) = 0; |
197 |
virtual int SendTo(const Address &address,Ptr<Packet> p) = 0; |
|
|
198 |
|
| 199 |
/** |
| 200 |
* \brief Send data to a specified peer. |
| 201 |
* \param address IP Address of remote host |
| 202 |
* \param buf A pointer to a raw byte buffer of some data to send. If this |
| 203 |
* is 0, we send dummy data whose size is specified by the third parameter |
| 204 |
* \param size the number of bytes to copy from the buffer |
| 205 |
* \returns -1 in case of error or the number of bytes copied in the |
| 206 |
* internal buffer and accepted for transmission. |
| 207 |
* |
| 208 |
* This is provided so as to have an API which is closer in appearance |
| 209 |
* to that of real network or BSD sockets. |
| 210 |
*/ |
| 211 |
int SendTo(const Address &address, const uint8_t* buf, uint32_t size); |
| 187 |
|
212 |
|
| 188 |
protected: |
213 |
protected: |
| 189 |
void NotifyCloseCompleted (void); |
214 |
void NotifyCloseCompleted (void); |