About the socket plugin.

Started by ysc3839, Aug 01, 2015, 03:38 PM

Previous topic - Next topic

ysc3839

function StartSocket()
{
Socket <- NewSocket("DataFunc");
Socket.Start(1234, 5);
}

function DataFunc(client, data)
{
print(client + ":" + "data");
}
I use this code to create a server. But when the client send a messase, the server crashed. What's the matter?

ysc3839

In the source code SocketInterfaces.cpp, line 250. (link)
I change f(uc, (char*)p->data); to f((int)uc, (char*)p->data);It won't crash any more. Who can tell me what cause this bug?
And please fix it soon! :)

ysc3839