SPECIFICATION OF THE INTERNAL LLP I. ASSUMPTIONS The internal LLP assumes that a transaction is the exchange of one pair of messages. The `request message' is passed from the client to the server, which sends a `response message' back to the client. It is meant to meet the following needs: 1. be as simple as possible 2. signal the end of a message as an `end of file' 3. allow a site to cancel and restart the message that it is currently about to send The internal LLP is supposed to use UNIX domain stream type sockets as it's channel and probably will not run on any other channel. This is because the protocol depends on specific properties of the channel that only the UNIX domain stream type socket has: Reliable sequenced unduplicated transport of data bytes governed by a stream semantic along with the immediate notification of the existence of out-of-band data. The latter property is not guaranteed by Internet domain TCP type sockets. It is because of this, that the internal LLP is never an option for transactions between different machines. Unfortunately out-of-band messages are not supported on 4.3BSD (Net2) and 4.4BSD (lite) UNIX domain sockets. In fact, I am not aware of any Unix system that does implement oob data for Unix domain sockets and I suspect there is no such implementation at all. However oob data is supported in Internet domain sockets, with the limitation that transmission may be delayed. II. NORMAL OPERATION CLIENT SERVER A. CONNECTION SETUP 1. connect to server accept connections yields newly opened, bidirectional, stream type socket 2. write read from-address as a character string delimited by ASCII STX B. REQUEST MESSAGE 3. write read message data 4. shutdown write part of read returns 0 delivered as socket `end of file' condition to higher layers C. RESPONSE MESSAGE 5. read write message data 6. read returns 0 delivered as shutdown write part of `end of file' condition to socket higher layers D. CONNECTION SHUTDOWN 7. socket became unusable since it is mutually widowed on both ends close socket close socket III. EXCEPTIONS 1. RESTART MESSAGE The site which is about to send a message may restart the transmission of the same message by sending the single ASCII character STX out of band. The other site is notified of the exception by a SIGURG signal. Upon reception of SIGURG the receiving site discards all data up to the mark, which indicates when the exception occured. The receiver restarts reception of the message immediately after that mark. 2. CANCEL TRANSACTION The site which is about to send a message may cancel the whole transaction by sending the single ASCII character CAN out of band. The other site is notified of the exception by a SIGURG signal. Any site may abort the transaction without further notification when it is not currently about to send a message. The notificateion is only necessary in order to allow the receiving process to distinguish between normal end of message block and abort.