Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update sockets module #301

Merged
merged 14 commits into from
Mar 3, 2017
Merged

Update sockets module #301

merged 14 commits into from
Mar 3, 2017

Commits on Oct 11, 2015

  1. Module rewrite

    - 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(), a new parameter
    called _libc_errors has been added, and, if enabled, libc errors will be
    returned instead of the previous made-up errors.
    - socket_close() now returns a value on success/failure.
    - Added non-blocking sockets at socket_open_nb().
    - Added socket_is_writable() to check if a socket is ready for write.
    - Added socket_is_readable() as an alias to socket_change().
    - Code rewritten to be more readable, it should be self-explaining now.
    Javivi committed Oct 11, 2015
    Configuration menu
    Copy the full SHA
    533e858 View commit details
    Browse the repository at this point in the history
  2. Update docs and fix AMBuild

    Updated documentation following the guidelines
    Javivi committed Oct 11, 2015
    Configuration menu
    Copy the full SHA
    9674e13 View commit details
    Browse the repository at this point in the history

Commits on Apr 2, 2016

  1. Fixs for the module

    - Fixed the backwards compatibility with the return codes
    - Merged socket_connect and socket_connect_nb
    - Added a 5th parameter to socket_open that takes bit flags to enable
    the new features (libc errors & nonblocking sockets)
    - Fixed an error on socket_send2 that caused the buffet not to start
    from the beginning if multiple calls were made
    - Updated docs
    - [docs] Prefixed error codes with SOCK_
    - [docs] Added the new flags SOCK_NON_BLOCKING and SOCK_LIBC_ERRORS
    - [docs] Added a new stock called SOCK_ERROR_EINPROGRESS(error) to be
    used when checking if a newly created nonblocking socket is connecting
    Javivi committed Apr 2, 2016
    Configuration menu
    Copy the full SHA
    3c49064 View commit details
    Browse the repository at this point in the history

Commits on Feb 20, 2017

  1. Fixes for the docs

    Fix some typos, shorten lines, document SOCK_ERROR_EINPROGRESS
    Javivi committed Feb 20, 2017
    Configuration menu
    Copy the full SHA
    386ce17 View commit details
    Browse the repository at this point in the history
  2. Document magic numbers

    No more magic
    Javivi committed Feb 20, 2017
    Configuration menu
    Copy the full SHA
    0f23329 View commit details
    Browse the repository at this point in the history
  3. Revert "Document magic numbers"

    This reverts commit 0f23329.
    Javivi committed Feb 20, 2017
    Configuration menu
    Copy the full SHA
    65adf18 View commit details
    Browse the repository at this point in the history
  4. More docs fixes

    Javivi committed Feb 20, 2017
    Configuration menu
    Copy the full SHA
    a5ef2db View commit details
    Browse the repository at this point in the history
  5. Fix broken socket_send2()

    Javivi committed Feb 20, 2017
    Configuration menu
    Copy the full SHA
    0af5dc7 View commit details
    Browse the repository at this point in the history

Commits on Feb 22, 2017

  1. Add error checking in send2()

    Javivi committed Feb 22, 2017
    Configuration menu
    Copy the full SHA
    053d887 View commit details
    Browse the repository at this point in the history
  2. Remove stock

    It should not be needed because nb sockets should always be checked or
    writability
    Javivi committed Feb 22, 2017
    Configuration menu
    Copy the full SHA
    26c6bb3 View commit details
    Browse the repository at this point in the history
  3. Fix some identations

    Javivi committed Feb 22, 2017
    Configuration menu
    Copy the full SHA
    c1fd0fc View commit details
    Browse the repository at this point in the history
  4. Fix return codes doc

    Javivi committed Feb 22, 2017
    Configuration menu
    Copy the full SHA
    aa7255d View commit details
    Browse the repository at this point in the history
  5. Fix socket_recv() regression

    strncopy will stop on a null byte, that makes the function unusable to
    receive binary data
    Javivi committed Feb 22, 2017
    Configuration menu
    Copy the full SHA
    d69430e View commit details
    Browse the repository at this point in the history
  6. More docs typo fixes

    Javivi committed Feb 22, 2017
    Configuration menu
    Copy the full SHA
    8cc2ab7 View commit details
    Browse the repository at this point in the history