Index of /atarilibrary/atari_cd04/NETZWERK/NET_0_21/TEST
Name Last modified Size Description
Parent Directory 11-May-2007 21:00 -
CLIENT.C 15-Jan-1994 06:43 3k
DGRAM.C 15-Jan-1994 06:43 1k
DGRAMD.C 15-Jan-1994 06:43 2k
MAKEFILE 15-Jan-1994 06:43 1k
MAKEFILE.TCC 15-Jan-1994 06:43 1k
SERVER.C 15-Jan-1994 06:43 2k
SOCKNAME.C 15-Jan-1994 06:43 1k
SOCKPAIR.C 15-Jan-1994 06:43 1k
SPEED.C 15-Jan-1994 06:43 2k
SPEEDD.C 15-Jan-1994 06:43 1k
The files in this subdirectory are used to test the socket stuff.
Here is a short description of what they do.
client.c/ Byte stream unix socket example. You can choose
server.c nonblocking mode and usage of select() by
#define'ing NONBLOCK. Blocking mode is the default.
Server opens the unix socket /tmp/fort and
listens for incoming connections. Client attempts
to connect to the server. If the connection is
established, server writes lots of messages to
client, which prints them. client sets the sockets
receive buffer size and prints some information about
recv/send buffer sizes obtained from getsockopt():
NOTE that server creates a (socket)file /tmp/fort, which
must be deleted after server is killed.
speed.c/ These two are nearly the same as the above ones, but
speedd.c they are used to test the througput in bytes per second
depending on the size of read, write and recv buffers.
You must give speedd the write buffer size as the first
argument. speed expects the read buffer size as the first
and the sockets receive buffer size as the second argument.
And now hold your breath, stream sockets are ten times
faster than MiNT-pipes in througput when you use big
buffers (10kb are good). On a 16 MHz ST you get about
0.8 Mb per second, whereas pipes hardly reach 80 kB per
sec.
dgramd.c/ Datagram unix socket example. You can choose for
dgram.c dgramd.c whether it should connect() or use sendto() by
#define'ing CONNECT.
dgram contacts the dgramd server and waits for response.
dgramd obtains the sender of the incoming datagram and
writes lots of messages to the sender, which prints them
along with the lentgth of the whole received datagram.
NOTE that dgramd creates a (socket)file /tmp/dgram, which
must be deleted after dgram is killed.
sockpair.c This tests socketpair(). You can choose SOCK_DGRAM or
SOCK_STREAM sockets by commenting out the appropriate
definition in sockpair.c.
sockpair creates a socketpair and forks a copy of `cat'
and connects its stdout with cat's stdin by the
socketpair. sockpair writes lots of messages to cat, which
will print them.
sockname.c Contains some tests dealing with addresses (ie socket names).
Define SOCK_TYPE as the type of socket you want to use,
possible values are SOCK_STREAM and SOCK_DGRAM.