Project idea:

The SYNAPSE library aims to create a 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 synchronous method.

After having a look at 'competitive' libraries I must say all of them were created relatively early (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 work still remains in asynchronous mode. Somewhere here is the root of Delphi programmers' myth that Winsock operates just asynchronously. However, synchronous mode is more natural in pre-emptive multitasking and multithreading environment. Synchronous mode (called 'blocking' in Winsock terminology) features acting thread waits until the needed operation terminates. Thus when we want to send data, the program exits function only after data is sent - or - if we want to receive data, the program exits the function only after the desired data is received.

Thus, much more crisp and simple programming is achieved. You especially 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 an asynchronous method, you would have to accept complicated event processing and synchronous mode simulation. Therefore a synchronous socket is simple and natural for the majority programming tasks.

The whole library is oriented on the WIN32 environment or Linux enviroment, so you will need Delphi 3.0 or higher and Kylix 1.0 or higher to use it. However some new ports for FreePascal are available too.

about.txt · Last modified: 2007/11/30 14:30 (external edit)
Driven by DokuWiki Recent changes RSS feed