Skip to main content

F. Network Message Formats

The VCD connects the server through ICP to a standard socket, establishing thereby a pair of connections between the VCD and the server. Command segments (server-to-VCD) and response segments (VCD-to-server) are sent over these connections, without regard to physical message boundaries, using byte size 8. The VCD is defined to operate in a segment-at-a-time mode (rather than character-at-a-time), with local echo. Therefore, the server never echoes under NETCRT.

In many cases URSA will send a sequence of command segments (as in the examples of the preceding chapter) at once; if there is sufficient allocation they will be sent in the same message. Response time may be improved, therefore, if the user site is able to buffer ahead on command segments. This buffering does raise break synchronization problems, which are solved in the following manner for reverse (server-to-user) break:

The server sends an INS on the control link and also a SYNC command (X'80') on the data link to the VCD. On receiving either, the VCD enters Control State and then achieves synchronization between the INS and BREAK; if the INS arrives first, the VCD executes normally all commands buffered in his host, except it ignores LOCAL commands, until the SYNC appears. Having achieved synchronization, the VCD continues normal command interpretation (without ignoring ensuing LOCAL commands).

By this means the server can regain control of the VCD to write new information at any time. For example, when URSA is used under NETCRT, most WRITE or AWRITE sequences will be preceded by a BREAK from the server, since URSA will not know the current state of the VCD. Even if URSA left the VCD in Control State, the user might have manually returned his VCD to Local State by pressing Reset.

After receiving an INS, the VCD executes rather than ignores buffered commands so that pending writes will not be lost in case that processing at the user side has been held up temporarily. The read commands executed after the server sent an INS might be irrelevant to a server, which can ignore the corresponding response segments. In order to do so, the server simply keeps matching counts of read commands sent and corresponding response segments received.

Command segments will use the following formats:

Form 1 (No parameters)  q:OPCODE(8)

where q = X'80' means SYNC

X'91' " LOCAL

X'92' " ERASE

X'93' " BLANK

X'94' " UNBLANK

X'95' " SAVE

X'96' " RESTORE

X'97' " SREAD

Form 2 (16 bit integer) q:OPCODE(8) + n:INTEGER(16)

where q = X'9E' means READ n

q = X'9C' " CURSOR n

In both cases, 0 <= n <= M x N

Form 3 (count and text) q:OPCODE(8) + n:LENGTH(16) + (TEXT(8) = n)

where q = X'9D' means WRITE

q = X'9A' means AWRITE

q = X'9F' and n=1 means FIND

A response segment, caused by a READ or SREAD command, has the following format:

   RESPONSE <-----X'A1' + CURSOR(16) + n:LENGTH(16) + (TEXT(8) = n)

where n > 0 is the number of characters actually read. CURSOR(16) is an integer giving the final cursor position after the corresponding read command. Note that the command READ 0 is permissible and may be used by the server to find the current cursor position, or to find out when the user presses Transmit.