Simple Sockets Library

Simple Sockets Library provides a simple C programming interface to sockets.
Download

Simple Sockets Library Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Public Domain
  • Price:
  • FREE
  • Publisher Name:
  • Charles E. Campbell and Terry McRoberts
  • Publisher web site:
  • http://mysite.verizon.net/astronaut/ssl/

Simple Sockets Library Tags


Simple Sockets Library Description

Simple Sockets Library provides a simple C programming interface to sockets. Simple Sockets Library provides a simple C programming interface to sockets.The Simple Sockets Library makes sockets easy to use and comes as public domain source code. It resembles C's file I/O, uses whatever port is available, has named servers and port reuse, streaming/blocking sockets used, polling support, blocking/selection support via numerous functions, timeout control and firewall support.Here are some key features of "Simple Sockets Library":· Resembles C's file i/o:· Sclose() Sgets() Sopen() Sprintf() Sputs() Sread() Sscanf() Swrite() Svprintf() · Uses currently available ports only, so if a server can be brought up, it will be · Named sockets -- servers have names, not fixed port addresses!· (no more REUSEADDR problems, linger setting, zombie sockets!) · Streaming/blocking sockets used · Polling supported (ie. avoids blocking):· Stest() Smasktest() Speek() · Numerous functions to handle multiple concurrent clients:· Smaskfdset() Smaskpush() Smasktime() Smaskunset() Smaskwait()· Smaskget() Smaskset() Smaskunfdset() Smaskuse() Sprtmask()· Smaskpop() Smasktest() · Timeout control:· Stimeoutwait() Smasktime() · The PortMaster (Spm): Maintains a distributed port/server-name database Each machine runs a PortMaster which maps servers by name to their ports (transparent to programmers and users!) · Firewall Support· The PortMaster can (optionally) only "put through" connections from approved machine sites · Supports "path"ing for sockets: one can use an environment variable to track down a server, by name, on any machine in a group:· Sopenv() · Doesn't need root privileges (that's Unix lingo...) · Now supports fixed ports (servers and/or clients) to facilitate interfacing to non-SSL servers/clientsThe Simple Sockets Library's main purpose is to provide an Application Programming Interface that strongly resembles the standard C library's file handling interface. Thus programmers find that the Simple Sockets Library's learning curve is particularly short. As a secondary purpose the Simple Sockets Library helps programmers avoid some common programming problems with sockets (avoided: large buffers that don't transfer in their entirety without special effort, the Nagle algorithm's practical effect of often limiting one to five transfers per second, servers whose ports refuse to re-open until two minutes have passed, etc). Strings are null-byte terminated just like regular C/C++ strings, facilitating their ease of use in C/C++ programming. The Simple Sockets Library preferentially uses names for its servers rather than requiring hard-coded port numbers. Imagine if, instead of files having names, everyone went about saying "use sector 4 and track 14" or somesuch thing. This situation reflects what we now have with sockets -- and when two programs use the same port number for their servers, they can't co-exist simultaneously on a system. However, especially for those whose programs must interface with other programs using hard-coded port numbers, the Simple Socket Library also supports hard-code port numbers. The Simple Sockets Library opens streaming sockets. Thus the Simple Sockets Library's sockets provide guaranteed delivery of information in the correct order (unlike datagrams, for example). The PortMaster (Spm), source code for which is part of the library, provides a "phonebook" to map server names to dynamically allocated port numbers. Port numbers thus won't clash; the operating system determines which ones are currently available and the PortMasters effectively publish the result.What's New in This Release:· (Marcel Satchel) improved for Windows· (Aug 22, 2005) included the "b" option for Sopen() (block until requested server becomes available)· (Marcel Satchel) Sinit.c fixed (yet again!)


Simple Sockets Library Related Software