Dependencies:   EthernetNetIf mbed NetServicesMin

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers message.h Source File

message.h

00001 
00002 #include "mbed.h"
00003 #include "TCPSocket.h"
00004 
00005 #define TYPE_GET 1
00006 #define TYPE_POST 2
00007 #define TYPE_RESPONSE 3
00008 
00009 #define BUFFER_LENGTH 256
00010 
00011 #define messageHandlerFunction(X) void X(TCPSocket* pConnectedSocket, char* msg, int len)
00012 
00013 void defaultMessageHandler(TCPSocket* pConnectedSocket, char* msg, int len);
00014 void vSendMessage(TCPSocket* pConnectedSocket, char* msg, int len);
00015 void vGetMessage(TCPSocket* pConnected);
00016 int iGetLine(TCPSocket* pConnectedSocket, char* buf, int len);
00017 void vSetMessageHandler(int messageType, void (*messageHandler)(TCPSocket*, char*, int));