SNICInterface for ThingPlug Example
Dependents: ThingPlug_WiFi_Example ThingPlug_WiFi_Example_2
Fork of SNICInterface by
Diff: Socket/TCPSocketConnection.h
- Revision:
- 29:6a0ba999597d
- Parent:
- 27:dcc4f34448f0
- Child:
- 32:ae95309643aa
diff -r b796031f6519 -r 6a0ba999597d Socket/TCPSocketConnection.h --- a/Socket/TCPSocketConnection.h Tue Apr 01 07:19:19 2014 +0000 +++ b/Socket/TCPSocketConnection.h Mon May 26 05:17:28 2014 +0000 @@ -31,13 +31,9 @@ #ifndef TCPSOCKET_H #define TCPSOCKET_H -#include "MurataObject.h" #include "Socket.h" #include "Endpoint.h" -namespace murata_wifi -{ - /** Interface class for TCP socket of using SNIC UART. */ @@ -68,17 +64,23 @@ @param length The length of the buffer to send. @return the number of written bytes on success (>=0) or -1 on failure */ - int send(unsigned char *data_p, int length); + int send(char *data_p, int length); + + /** Send data to the remote host. + @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_p, int length); /** Receive data from the remote host. @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(unsigned char *data_p, int length); + int receive(char *data_p, int length); private: }; -} #endif