View Single Post
Destro-
Veteran Member
Join Date: Jun 2010
Location: $me->location();
Old 06-11-2015 , 13:44   Re: Module: Threaded Sockets
Reply With Quote #22

socket_recv_t()

It does not support a binary transfer (null byte)?

@EDIT
suggestions:
- Add the "iThreadHandle" param on callbacks or a array to pass custom data (if you do this, you could remove "iThreadState" and not implement "iThreadHandle")
- Remove param "protocol", only support TCP.
- iRecvDataLen is bytes received
- Check callback valid public fuction
- Support null bytes for recv

@EDIT2
win2008:
50% CPU usage on STATE_READ

code:
Spoiler


@EDIT3
I haven't thought before, but threads are totally unnecessary, you can use non-blocking mode.

@EDIT4
Really I needed something functional now xd.

Github:
Github / Destro- / amxx / sockets_async

Last version


Spoiler
__________________

Last edited by Destro-; 06-22-2015 at 14:28.
Destro- is offline