View Single Post
Javivi
AlliedModders Donor
Join Date: Dec 2008
Old 06-09-2015 , 08:43   Re: Module: Threaded Sockets
Reply With Quote #20

Nice job. I was working on an update but this one is way better, so be sure to push it to amxmodx's github.

Feel free to take any code you want to improve your module, as I've seen that you didn't change much of the default code.

https://github.com/Javivi/amxmodx/co...sockets-update

Biggest changes are:
Code:
- WinSock version changed from 1.1 to 2.2.
- Properly check for WinSock initialization on OnAmxxAttach/Detach.
- Now, natives will not be added if we can't start up WinSock.
- socket_open is now IP version agnostic (both IPv4 and IPv6 are
supported).
- Error reporting has been changed on socket_open, now it returns the
actual libc errors instead of the previous made-up errors.
- socket_close now returns a value on success/failure.
- Code rewritten to be more readable, it should be self-explaining now.
__________________
Javivi is offline