View Single Post
draft
Senior Member
Join Date: Jul 2007
Location: Russia, Saint-Petersburg
Old 08-21-2015 , 13:00   Re: Module: Threaded Sockets
Reply With Quote #26

Thx, this worked for me! But the disadvantage is that we should always count exact number of bytes in code to send them. And if i need, for example, 3 null bytes at the end, it is required to make len + 3 to send them correctly.

Please, update sockets_async.inc to this code. It allows the module to autoload instead of writing it in modules.ini.
PHP Code:
#if AMXX_VERSION_NUM >= 175
    #pragma reqlib sockets_async
    #if !defined AMXMODX_NOAUTOLOAD
        #pragma loadlib sockets_async
    #endif
#else
    #pragma library sockets_async
#endif 
Also, ive found that if 2 or more plugins are using this module there are several memory collisions between them. It means that if im sending info in second plugin, then im recving it in first of them that has fw_sockReadable hook. May be, im doing smth wrong, but in native amxx modules there are not collisions between plugins.
__________________
draft is offline