Synapse
Synchronous TCP/IP Library for Delphi

Project idea:

    SYNAPSE library aims to create complete library of classes and functions that would markedly simplify application programming of network communication using Winsock.

    At first glance this effort might seem needless as there are many free components covering this area. However, they mostly use asynchronous methods while SYNAPSE library operates in a synchonous way.

    After having a look at 'competetive' libraries I must say all of them were created relatively soon (for Delphi 1.0 and Win16). Thanks to cooperative multitasking a synchronous access to winsock was not possible. This is the reason why Microsoft added asynchronous mode to winsock implementation.

    Authors did not want to rewrite their libraries after WIN32 arrived and so their works still remain in asynchronous mode. Somewhere here is the root of Delphi programmers' myth that winsock operates just asychronously. However, synchronous mode is more natural in preemptive multitasking and multithreading environment. Synchronous mode (called 'blocking' in winsock terminology) features e.g. acting thread waits until the needed operation terminates. Thus when we want to send data, program exits function only after data is sent - or - if we want to receive data, program exits function only afterwanted data is received.

    Thus much more crisp and simple programming is enabled. Especially you feel it when trying to implement any Internet protocol, which is typically based on 'send-wait for reply' method. If you want to implement it in asynchronous method, you would have to accept complicated event processing and synchronous mode simulation. Therefore synchronous socket is simple and natural for majority tasks of programming practice.

    The whole library is oriented on WIN32 environment so you need Delphi 2.0 or higher to use it. Intentionally project does not use Winsock 2.0 services to be allowed to run on all WIN32 platforms (except Windows CE) as Winsock 2.0 is notavailable in first Windows 95 versions.