San Diego State University -- This page last updated March 30, 1995
Standard C Library routines
Look at online man pages
apropos <word>
orman -k <word>
Example: write(2)
Saturn: man 2 write
Rohan: man -s 2 write
NOTE: xinetd is only installed on saturn.
inetd requires all services to be listed in /etc/services
xinetd allows unlisted services
Sample configuration file:
service fortune { type = UNLISTED port = <yourport> socket_type = stream protocol = tcp wait = no service = <server and args>}
Replace <yourport> with your UID and replace <server and args> with the path to your fortuned program and any arguments.
Start xinetd as follows:xinetd -d -f <configfile>
where <configfile> is the file which contains the xinetd configuration.
Reference the following man pages:
Important: Always run xinetd with the -d flag.
(API == Application Programming Interface)
What is an API?
Why do we need/want APIs?
Original purpose of rplay:
Requirements:
rplay uses IPC.
The server, rplayd, can reside on any machine.
rplayd supports two protocols:
rplayd:
Uses UDP
sounds are identified by name
rplay clients only need to send over the name of the sound in a rplay packet.
In a game situation there can potentially be thousands of sounds played.
Since the sounds are non-critical, UDP packet loss is not a major concern.
Uses TCP
Designed to be used by intelligent clients but also humans.
Allows sending and receiving of actual sound files
Can asynchronously notify a client about a given set of events.
Everything that can be done with the rplay protocol can be done with rptp.
rplay packets can have several sound names
Each sound name has attributes associated with it (name, volume, priority, spool id)
Sequence of calls for a client using rplay:
opening a "connection"
int rplay_fd = rplay_open("hercules"); if (rplay_fd < 0) { rplay_perror("rplay_open"); exit(1); }
Creating an rplay packet
RPLAY *rp = rplay_create(RPLAY_PLAY); if (rp == NULL) { rplay_perror("rplay_create"); exit(1); }
Setting attributes in a packet
rplay_set(rp, RPLAY_APPEND, RPLAY_SOUND, "bogus.au", RPLAY_VOLUME, 200, NULL);
Playing a sound
if (rplay(rplay_fd, rp) < 0) { rplay_perror("rplay"); exit(1); }
a rplay packet only needs to be created once
rplay_set (and also rplay_get) use attribute lists
Other attributes are: