DONE

    # of servers per connect token increased from 16 to 32.

    Private connect token is now zero padded to 1024 bytes for consistency

    Connect token buffer size reduced from 4096 to 2048.

    Server should return maximum # of clients to client inside connect token. It's important for client to know that it is client X/Y.

    Fixed bug where client didn't store its client index! Wow. whoops.

    Reduced size of challenge token to 300 bytes. That's all that is needed.

    Removed the always 0 "reason" for connection denied. Pointless. There is only one reason :)

    Added some code on read connection payload packet to ignore packets with payload data size < 1. Otherwise, could have performed zero size allocation.

    Removed the connect token HMAC from the challenge token as it's no longer used.

    Added code to the encryption manager to expire the encryption manager at a future time. This lets the server to ignore clients who don't establish connection with the server within a short period of time.

    I noticed that I'm not caching the user data anymore. What's the point of providing user data in the binary, if it's not cached anywhere in the reference implementation?

    Added code to cache the user data per-client on connect, and an accessor function: netcode_server_client_user_data

    Extended interface so client and server can get next packet sequence # to be sent, and on packet receive can get sequence # of packet. This lets users exploit the 64bit packet sequence for reliability. Without this, it's wasted and the user has to send their own sequence #.

    Switched chacha implementations to IETF 96 bit nonce to support golang port.

    Fixed endian confusion in IPv4 address.

    Fixed memory leaks and uninitialized memory found with valgrind.

    Added soak test and fixed a massive bug where connect_start_time was being set to 0.0, instead of current client time @ connect.

    Setup a profiling suite.

    No perf issues found. All time spent in packet encrypt/decrypt and sendto/recvfrom as expected.

    Added support for custom log function.

    Added support for custom assert handler.

    Add support for custom allocators.

    Improved support for C++ by adding NETCODE_CONST. Now compiles clean on C++11

    Sketched out interface for server-side loopback clients.

    Added client_loopback per-client to netcode server.

    Updated disconnect function to assert if it's used to disconnect a loopback client.

    Updated disconnect all clients to skip over loopback clients.

    Disabled timeouts for loopback clients.

    Added safety check in regular receive and packet send codepath to avoid doing so for loopback clients.

    Added a special section for loopback clients to send their payload packets directly via callback.

    Added special loopback client disconnect function.

    Extended loopback client connect to take client id.

    Added function pointer and context for callback when sending loopback packets to client.

    Added support to user data for loopback client connect.

    Added code to connect a loopback client.

    Added code to disconnect a loopback client.

    Sketched out code to process packets for loopback client directly.

    Implement code to call into send packet callback when sending packets to loopback client.

    Added packet sequence to loopback packet send and process.

    Extended code for processing loopback packets from client to perform a copy and wrap a "packet" structure around it before adding to queue.

    In theory, should all work now. AHAHAHAH. Yeah right...

    Implement a unit test to ensure that the loopback client is properly created, reserves the slot, and can process packets and send packets through the callback properly.

    Test on windows and linux, then we're ready for 1.0 release!

TODO

    Add an interface for reading and writing packets without copying or allocations.
