Socket program version 1.2
On August 6 1999 I made the interim release 1.2 of the Socket(1)
Socket(1) implements an interface to TCP sockets at shell level.
Client and server sockets can be used from shell scripts or
interactively. Socket can also run a program with stdin, stdout, and
stderr connected to the socket connection. A number of sample shell
scripts are included. Socket-1.2 runs on Linux (RH 5.2 with
2.2.2 kernel), Solaris (2.6 and 7), and FreeBSD (2.2.7, 3.2). It
should be easy to port to similar platforms.
This version has not been tested very thoroughly. If you
encounter any problems, get back to me and use version 1.1 until the bug is fixed.
Socket version 1.2 is the successor of the widespread 1.1 version
from September 1992. The changes are few:
Socket 1.2 is tested on much less platforms than 1.1, just because I
don't have access to all these machines that I had in my university
days. I would love to hear of successes and difficulties installing
or porting it to other platforms.
- Adapted to Linux (in this case RH 5.2 with kernel 2.2.2), Solaris
2.6 / 7, and FreeBSD 2.2.7 / 3.x. Other platforms are not (explicitly)
supported by this release.
- Except for SIGCHLD no signals are handled specially; siglist.c
- Multiple -vv options increase verbosity.
- Sets SO_REUSEADDR unless -R option is specified.
- Needs an ISO C compiler (and I hope it is not GCC dependent).
- License changed to Berkeley-style.
- Moved from ShapeTools to CVS (and a new repository -- that all
source version numbers are 1.2 is really coincidental!)
If you have difficulties installing Socket 1.2 on your platform and
don't feel like trying to port it, try version 1.1 instead. It might
make a difference (see here for version
1.1). It is available from the same source as 1.1 (see below).
Socket version 1.2 is as source code freely available under a
BSD-style license. you can download it from ftp.fu-berlin.de
I began working on Socket version 2 earlier this year. I won't make
any promises when it will be ready, but when it is, it will also be
released under a BSD-like license and will have the following
In the works are a super-generic option handling system and a select
loop that should be usable in most other event-driven programs as
well. After all, the license means you can actually use it!
- UDP sockets
- Unix domain sockets
- separate timeouts for send and receive
- adjustable buffer size
- read and send line-oriented input (with or without newline
- access to more socket options
- use zero-size packet as EOF (UDP only)
Back to start page