Back to index

LispMe socket support

Please read the PalmOS documentation describing many details of the Pilot's user interface, event and resource system. This chapter shows the Scheme aspect only.

LispMe currently supports TCP/IP sockets (streaming mode) with LispMe as a client only. (Other options may be added in later versions) The API calls are similar to Bigloo which provide (IMHO) a nice abstraction from the low-level network stuff.

To use sockets you have several options:

The java directory contains a simple echo server to test LispMe's sockets with POSER. You can connect to the server with (make-client-socket "localhost" 4711) and read and write to the ports obtained by socket-input and socket-output.

The net library is opened automatically on the first socket operation, meaning that the dialup connection is made at this point. The connection is held open until LispMe is closed, in which case the net library is put into a close-wait state. In this state the connection remains open during an interval configurable in the Palm's connection setup dialog to give other Internet applications the chance to reuse an open connection. You can also close the connection in LispMe explicitly with close-netlib, which either can stop the connection immediately or delayed.

Have a look at the socket sample code.

Associated language elements

close-netlib lookup-host make-client-socket socket-down? socket-host-address
socket-hostname socket-input socket-local-address socket-output socket-port-number
socket-shutdown socket?