DyConnect Networking Library

Description:

  DyConnect is a library meant to simplify network programming. It
  provides an easy to use, portable solution for both TCP/IP and UDP
  networking.

  See the manual and example programs for additional info on how to
  use DyConnect.

Installation:

  See the appropriate instructions in the installdocs directory.

Copyright notice:

Copyright (c) 2005 David C. McCallum

This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the
use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

    1. The origin of this software must not be misrepresented; you must not
    claim that you wrote the original software. If you use this software in a
    product, an acknowledgment in the product documentation would be
    appreciated but is not required.

    2. Altered source versions must be plainly marked as such, and must not be
    misrepresented as being the original software.

    3. This notice may not be removed or altered from any source distribution.

Changelog:

1.50 - Added appendVariable() and extractVariable() to DyBytes
     - Renamed multiple DyBytes functions to use a standard theme (insert and append)
     - Added the DasyneClient, DasyneServer, SyncData and SyncArray classes
     - PollingConnect now uses non-blocking sockets instead of threads
     - Added the cancel() function to PollingConnect
     - Deleting a PollingConnect class that is in the middle of a connect is no longer a blocking
       operation
     - Removed the PollingMemory class
     - Hid classes that do not form part of the API under the libdconn namespace
1.40 - Increased the allowed UDP packet size to 32767 bytes
     - More robust reporting of Windows errors
     - Split the DyConnect class into DyConnect and NetworkEngine
     - Removed the last of the static data, you can now create multiple NetworkEngine instances
       to listen for connections on different ports
     - UDPSock's recvData function now takes a bufferSize parameter
     - Fixed a bug where enableTCPListen() wasn't setting errMsg consistently
     - Fixed a crash when NetworkEngine functions were called without first calling initialize()
     - Moved the Windows accept() function into TCPListen, where it belongs
     - Switched from dynamic arrays to vectors in the SharedMemory class
     - crcInit() no longer needs to be manually called, it's called by startup()
     - PollingConnect's connectToHost requires you to specify the NetworkEngine that will handle
       the resulting connection
     - The PollingConnect class can now handle an unlimited number of simultaneous connects
     - Multiple tweaks and changes, mainly aimed at making the code more readable
1.30 - Added IPv6 support
     - DY_PACKET_SIZE is now 1452 bytes, to handle the 48-byte IPv6 UDP header
     - added the setIPVersion() function to DyConnect
     - the UDPSock class is now thread-safe (no static data)
     - UDPSock's sendData and recvData functions now set errMsg
     - redesigned DyConnect's thread scheduling; there are no longer any artificial limits
       on how much data a thread can send or receive
     - added the limitBandwidth() function to DyConnect so you can re-impose some artificial
       limits
     - setCyclesPerSec() is deprecated.
     - setBufferSize() can now take values of up to 32 kilobytes
     - fixed a bug where the automatic disconnect on timeout feature wasn't accurately measuring
       time
1.20 - Added the disableTCPListen() function to DyConnect
     - enableTCPListen() should now be called after DyConnect is initialized
     - fixed a bug where the TCP listener thread was outputting errors to stdout instead
       of returning them
     - fixed a bug in UDPSock where the socket wasn't being closed by the destructor
     - fixed a bug in UDPSock where the socket was considered to be open even if openSocket()
       failed
     - corrected some mistakes in the manual
1.10 - Improved memory leak checks in debug mode
     - DyBytes is now implemented with a deque
     - Added the removeFront() and setByte() functions to DyBytes
     - Got rid of the now obsolete YByteList class
     - Minor tweaks to improve performance
     - Added the PollingConnect and PollingData classes
1.01 - Re-wrote and greatly simplified YByteList
     - Got rid of multiple redundant classes
     - Fixed a few errors in the documentation
     - Upgraded zlib (windows version) to 1.2.3
     - Overloaded DyBytes' ostream << operator
1.00 - Simplified code and improved access time in DyBytes class
     - Got rid of DyBytes' getStatus() function
     - DyBytes functions addChar, addString etc no longer return false
     - Added crc32() function to DyBytes
     - Renamed multiple DyBytes functions to improve ease of use, now it's more like
       a vector
     - DyConnect functions getData() and sendData() no longer return false on memory
       allocation failures - that's now handled internally
     - DyConnect's destructor now gives threads a couple seconds to finish sending data
     - Fixed a bug in the fileclient program where files weren't written the drive
       correctly in Windows
0.91 - Fixed a bug in the fileserver example program where it wasn't loading the
       entire file
     - Fixed a bug where, if sending data to client 1, and client 1 disconnects, and
       client 2 immediately connects on the same thread, then client 2 might possibly
       have received some of client 1's data
     - Various other bug fixes related to immediate reconnects on the same thread
     - Added the getRemotePort() and getRemoteIP() functions to DyConnect
0.90 - Added the enableTCPListen() function, initialize() doesn't take any parameters
       now
     - Fixed a bug where setBufferSize() wasn't generating any error messages
     - Fixed a bug that caused DyConnect's getMessage function to occasionally skip data
     - Removed the pthread-win32 library, DyConnect now uses Windows-native threads
       when compiled under MinGW
     - Created 'official' error codes for send and recv functions
     - Made error checking in TCPSock more robust
     - Added the UDPSock wrapper class
0.80 - Added support for winsock 2 under the MinGW compiler.
     - Fixed up and clarified obsolete comments in multiple classes.
0.70 - Added setMaxConnections(), setCyclesPerSec(), and setBufferSize configuration
       functions
     - errMsg now shows errors from all initialization functions
     - minor changes to make DyConnect functions more resistant to misuse
     - created SharedMemory class, which handles automatic locking/unlocking of mutexes
     - Server programs can now simultaneously accept and create connections
     - Fixed a memory leak when a call to connectToHost() failed
     - If a server was unable to listen for connections on the specified port, initialize()
       now returns an error
     - Added the GlobalSettings class
     - Modified the example programs
     - Re-wrote parts of the manual, moved the manual into HTML format
0.61 - Changed the names of internal classes
     - Various style improvements; stopped using namespace in header files
0.60 - First release
     - Renamed multiple classes; NetControl is now DyConnect
     - Added the isClientNew() function to DyConnect
     - Switched DyConnect to use DyBytes instead of YAChar data classes
     - Fixed a bug in YByteList where removeFirst wasn't clearing the list
     - Added two sample programs: simple_server and simple_client
     - Added user manual and makefile
     - Got rid of global variables in DyConnect
     - Modified DyConnect's sendData() to return a boolean
     - Got rid of a trivial memory leak in DyConnect
     - Set tcplisten class to use non-blocking socket
0.54 - Fixed a potential bug where NC_clientIsNew wasn't declared as volatile
0.53 - Fixed a bug in NetControl and YClientSock where binary data was being corrupted
0.52 - Fixed a bug in NetControl where data sent immediately after a socket was created could be lost
0.51 - Switched NetControl to use a YByteList rather than a YAChar for its send buffer - greatly
       reduces CPU usage.
       Fixed a bug in YClientSock where congestion was being interpreted as connection failure
0.50 - Added connectionOpen() function to YClientSock
       Added getUnsentBytes() function to NetControl
       Tweaked NL_SocketFunc's loops / second in NetControl
       Increased YClientSock's default buffer size from 1024 to 4096
       Added isConnected() function to NetControl
0.40 - NetControl's connectToHost() function now tells you the thread position of the new connection
       Fixed a bug where YClientSock would crash if the remote host disconnected
       Fixed a bug in YClientSock where a second connection could be created using the same instance
       Improved coding style in YServerSock class
0.30 - Switched YClientSock to non-blocking, added sendData() function to NetControl
0.20 - Added NetControl class.
0.10 - Added YClientSock and YServerSock classes.

Contact:

  You can contact me at dmccallum9@gmail.com with bugs, feedback and feature requests.
