View Single Post
RealForce
Junior Member
Join Date: Jan 2010
Old 06-18-2010 , 11:41   Re: [EXTENSION] Socket (3.0.1)
Reply With Quote #274

Quote:
Originally Posted by sfPlayer View Post
Your request looks ok. You didn't post the receive-handler, I guess the problem lies there.
I forgot to post it.

Here is receive handler

Code:
public OnSocketReceive(Handle:socket, String:receiveData[], const dataSize, any:client)
{
    if(dataSize > 0)
    {
        PrintToChatAll(receiveData);
        
        if ( !StrEqual(receiveData, "hjkjhkjhk") )
        {
            PrintToChatAll("jhkjhkhjkjhkjhkjhkjhk");
        }                                                                          
        else
        {
            PrintToChatAll("gkgkjkjhkhjkhkhjkjhkh");
        }
    }
    CloseHandle(socket);
}
I really don't understand why I only get header response?

PrintToChatAll prints the receiveData but there is only header lines nothing more. there is Content-Length with correct size but I don't get the content string.

Last edited by RealForce; 06-18-2010 at 11:43.
RealForce is offline