Handler function
Type 1
The handler function of Type 1 will be called when a client request something that starts with the protocols that the function AddinData sended.
The handler function doesn't have to be exported, the AddinData function sends the address of this function.
Syntax
Handler(
SOCKET Client,
LPTSTR SendedData,
DWORD SendedDataSize,
LPTSTR Header);
Parameters
Client
A descriptor identifying a connected socket that was made connecting to a socket.
SendedData
A pointer to a NULL terminated string the contains all the data that the client has send (header and data).
SendedDataSize
The size of the SendedData string.
Header
A pointer to a NULL terminated string the contains the header only
Return Value
If the function returns 1 the server will close the connection with the client by calling shutdown and wait until recv returns 0.
Return any other value and the server will just continue like nothing happend (the last part can be used for a stat add-in)