next up previous contents
Next: 10 Debugger Programmer's Interface Up: 9 Interprocess Communication under Previous: 9.2.3 Making Your Own

Out-Of-Band Data

The TCP/IP protocol allows users to send data asynchronously, otherwise known as out-of-band data. When using this feature, the operating system interrupts the receiving process if this process has chosen to be notified about out-of-band data. The receiver can grab this input without affecting any information currently queued on the socket. Therefore, you can use this without interfering with any current activity due to other wire and remote interfaces.

Unfortunately, most implementations of TCP/IP are broken, so use of out-of-band data is limited for safety reasons. You can only reliably send one character at a time.

This routines in this section provide a mechanism for establishing handlers for out-of-band characters and for sending them out-of-band. These all take a Unix file descriptor instead of a wire, but you can fetch a wire's file descriptor with wire-fd.

[Function]
wire: add-oob-handler fd char handler

The function add-oob-handler arranges for handler to be called whenever char shows up as out-of-band data on the file descriptor fd.

[Function]
wire: remove-oob-handler fd char

This function removes the handler for the character char on the file descriptor fd.

[Function]
wire: remove-all-oob-handlers fd

This function removes all handlers for the file descriptor fd.

[Function]
wire: send-character-out-of-band fd char

This function Sends the character char down the file descriptor fd out-of-band.



Raymond Toy
Mon Jul 14 09:11:27 EDT 1997