Navigation: Programming Cookbook > Sockets Connectivity >
The Socket Connection Interface
The Dolphin Sockets Connection package provides several levels of interface to the underlying Windows Sockets layer.
The lowest level of interface is provided by the WSockLibrary class, which is an ExternalLibrary subclass responsible for interface into the function calls in the Windows Sockets, WSOCK32.DLL library. We provide methods for most of the functions in this library. Most often, you will find that the higher levels of interface provided by Sockets Connection will be more than adequate for your networking needs but, if you find that you need to add facilities, you always can "kick down" and call methods in WSockLibrary when necessary.
Next up, Sockets Connection implements a number of classes that make it easy to set up a network link with a Socket at either end. At this basic level you can send and receive bytes and arrays of bytes across the link.
A level further up you'll find that each Socket can provide you with a read stream and a write stream for easy streaming of data using the standard Smalltalk Stream protocol. This is a very powerful level of interface and one that you will probably find yourself using most often.
At the highest level it is possible to connect a Dolphin STB filer onto either of the two Socket streams, thus allowing serializable objects to be easily passed back and forth across a connection.
This text is intended to provide a general user's guide on how to use Sockets Connection. We will not touch any further on the lowest level of interface; the WSockLibrary function calls. If you need more information on these then you should consult the Microsoft SDK documentation or a suitable book. We will run, however, through a number of scenarios for using the higher levels of interface. If you want reference information about each of the classes and the methods that they provide, then you should consult the code directly. All of the classes and methods are commented appropriately