1.1 --- a/src/node/socket.h Fri Feb 01 21:31:15 2008 -0800
1.2 +++ b/src/node/socket.h Sat Feb 02 15:52:54 2008 -0800
1.3 @@ -78,21 +78,24 @@
1.4 * \param closeCompleted Callback invoked when the close operation is
1.5 * completed.
1.6 */
1.7 - void SetCloseCallback (Callback<void,Ptr<Socket> > closeCompleted);
1.8 + void SetCloseCallback (Callback<void, Ptr<Socket> > closeCompleted);
1.9
1.10 /**
1.11 - * \param connectionSucceeded this callback is invoked when the connection request
1.12 - * initiated by the user is successfully completed. The callback is passed
1.13 - * back a pointer to the same socket object.
1.14 - * \param connectionFailed this callback is invoked when the connection request
1.15 - * initiated by the user is unsuccessfully completed. The callback is passed
1.16 - * back a pointer to the same socket object.
1.17 - * \param halfClose XXX When exactly is this callback invoked ? If it invoked when the
1.18 - * other side closes the connection ? Or when I call Close ?
1.19 + * \param connectionSucceeded this callback is invoked when the
1.20 + * connection request initiated by the user is successfully
1.21 + * completed. The callback is passed back a pointer to
1.22 + * the same socket object.
1.23 + * \param connectionFailed this callback is invoked when the
1.24 + * connection request initiated by the user is unsuccessfully
1.25 + * completed. The callback is passed back a pointer to the
1.26 + * same socket object.
1.27 + * \param halfClose XXX When exactly is this callback invoked? If
1.28 + * it invoked when the other side closes the connection ?
1.29 + * Or when I call Close ?
1.30 */
1.31 void SetConnectCallback (Callback<void, Ptr<Socket> > connectionSucceeded,
1.32 - Callback<void, Ptr<Socket> > connectionFailed,
1.33 - Callback<void, Ptr<Socket> > halfClose);
1.34 + Callback<void, Ptr<Socket> > connectionFailed,
1.35 + Callback<void, Ptr<Socket> > halfClose);
1.36 /**
1.37 * \brief Accept connection requests from remote hosts
1.38 * \param connectionRequest Callback for connection request from peer.
1.39 @@ -100,28 +103,31 @@
1.40 * ip address and the port number of the connection originator.
1.41 * This callback must return true to accept the incoming connection,
1.42 * false otherwise. If the connection is accepted, the
1.43 - * "newConnectionCreated" callback will be invoked later to give access
1.44 - * to the user to the socket created to match this new connection. If the
1.45 - * user does not explicitely specify this callback, all incoming
1.46 - * connections will be refused.
1.47 + * "newConnectionCreated" callback will be invoked later to
1.48 + * give access to the user to the socket created to match
1.49 + * this new connection. If the user does not explicitly
1.50 + * specify this callback, all incoming connections will be refused.
1.51 * \param newConnectionCreated Callback for new connection: when a new
1.52 * is accepted, it is created and the corresponding socket is passed
1.53 - * back to the user through this callback. This user callback is passed
1.54 - * a pointer to the new socket, and the ip address and port number
1.55 - * of the connection originator.
1.56 + * back to the user through this callback. This user callback is
1.57 + * passed a pointer to the new socket, and the ip address and
1.58 + * port number of the connection originator.
1.59 * \param closeRequested Callback for connection close request from peer.
1.60 * XXX: when is this callback invoked ?
1.61 */
1.62 - void SetAcceptCallback (Callback<bool, Ptr<Socket>, const Address &> connectionRequest,
1.63 - Callback<void, Ptr<Socket>, const Address&> newConnectionCreated,
1.64 - Callback<void, Ptr<Socket> > closeRequested);
1.65 + void SetAcceptCallback (Callback<bool, Ptr<Socket>,
1.66 + const Address &> connectionRequest,
1.67 + Callback<void, Ptr<Socket>,
1.68 + const Address&> newConnectionCreated,
1.69 + Callback<void, Ptr<Socket> > closeRequested);
1.70 void SetSendCallback (Callback<void, Ptr<Socket>, uint32_t> dataSent);
1.71 /**
1.72 * \brief Receive data
1.73 * \param receivedData Invoked whenever new data is received.
1.74 *
1.75 */
1.76 - void SetRecvCallback (Callback<void, Ptr<Socket>, Ptr<Packet>,const Address&> receivedData);
1.77 + void SetRecvCallback (Callback<void, Ptr<Socket>, Ptr<Packet>,
1.78 + const Address&> receivedData);
1.79
1.80 /**
1.81 * \param address the address to try to allocate