mbed socket API
Dependents: EthernetInterface EthernetInterface_RSF EthernetInterface EthernetInterface ... more
Deprecated
This is an mbed 2 sockets library. For mbed 5, network sockets have been revised to better support additional network stacks and thread safety here.
Diff: TCPSocketConnection.h
- Revision:
- 13:084c7fa00503
- Parent:
- 12:8867c9da3b08
- Child:
- 14:c159ce890a45
--- a/TCPSocketConnection.h Sat Aug 04 08:15:09 2012 +0000
+++ b/TCPSocketConnection.h Sat Aug 04 08:24:54 2012 +0000
@@ -45,37 +45,39 @@
*/
bool is_connected(void);
- /** Send data to the remote host. Applications are responsible for
- checking that all data has been sent; if only some of the data was
- transmitted, the application needs to attempt delivery of the
- remaining data.
- \param data The buffer to send to the host.
- \param length The length of the buffer to send.
- \return the number of written bytes on success (>=0) or -1 on failure
+ /* \brief Send data to the remote host. Applications are responsible for
+ * checking that all data has been sent; if only some of the data was
+ * transmitted, the application needs to attempt delivery of the
+ * remaining data.
+ * \param data The buffer to send to the host.
+ * \param length The length of the buffer to send.
+ * \return the number of written bytes on success (>=0) or -1 on failure
*/
int send(char* data, int length);
- /** Send all the data to the remote host. This method continues to send
- data until either all data has been sent, or an error occurs, or a timeout occurs.
- \param data The buffer to send to the host.
- \param length The length of the buffer to send.
- \return the number of written bytes on success (>=0) or -1 on failure
- */
+ /* \brief Send all the data to the remote host. This method continues to send
+ * data until either all data has been sent, or an error occurs, or a
+ * timeout occurs.
+ * \param data The buffer to send to the host.
+ * \param length The length of the buffer to send.
+ * \return the number of written bytes on success (>=0) or -1 on failure
+ */
int send_all(char* data, int length);
- /** Receive data from the remote host. Return as soon as some data is available.
- \param data The buffer in which to store the data received from the host.
- \param length The maximum length of the buffer.
- \return the number of received bytes on success (>=0) or -1 on failure
+ /* \brief Receive data from the remote host. Return as soon as some data is available.
+ * \param data The buffer in which to store the data received from the host.
+ * \param length The maximum length of the buffer.
+ * \return the number of received bytes on success (>=0) or -1 on failure
*/
int receive(char* data, int length);
- /** Receive all the data from the remote host. This method continues to receive
- data until either length bytes has been received, or an error occurs, or a timeout occurs.
- \param data The buffer in which to store the data received from the host.
- \param length The maximum length of the buffer.
- \return the number of received bytes on success (>=0) or -1 on failure
- */
+ /* \brief Receive all the data from the remote host. This method continues to receive
+ * data until either length bytes has been received, or an error occurs, or a
+ * timeout occurs.
+ * \param data The buffer in which to store the data received from the host.
+ * \param length The maximum length of the buffer.
+ * \return the number of received bytes on success (>=0) or -1 on failure
+ */
int receive_all(char* data, int length);
private:
mbed official


