Dependencies: EthernetNetIf mbed NetServicesMin
Diff: message.h
- Revision:
- 0:be9ccd3a915d
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/message.h Wed Sep 21 15:54:53 2011 +0000 @@ -0,0 +1,17 @@ + +#include "mbed.h" +#include "TCPSocket.h" + +#define TYPE_GET 1 +#define TYPE_POST 2 +#define TYPE_RESPONSE 3 + +#define BUFFER_LENGTH 256 + +#define messageHandlerFunction(X) void X(TCPSocket* pConnectedSocket, char* msg, int len) + +void defaultMessageHandler(TCPSocket* pConnectedSocket, char* msg, int len); +void vSendMessage(TCPSocket* pConnectedSocket, char* msg, int len); +void vGetMessage(TCPSocket* pConnected); +int iGetLine(TCPSocket* pConnectedSocket, char* buf, int len); +void vSetMessageHandler(int messageType, void (*messageHandler)(TCPSocket*, char*, int)); \ No newline at end of file