DICTIONARY server protocol: Contact name is "DICTIONARY". A full connectional is established (additional data in the RFC is ignored, there's no simple mode) Command lines to the server are of the form COMMAND[ARGUMENT] where the part in brackets, [], is optional. is ASCII space, octal 40, and is the LispMachine NewLine character, octal 215. The server responds with a single line of the same format, and then if there's additional data it comes next, followed by an EOF packet. The actual response will be either ERRORRECOVERABLE or ERRORFATAL or a command-depenedent response. FATAL-type errors are just that, fatal, and the server will go away after sending the ERROR message. Command: HELP This command will send back the text of this document, the dictionary protocol, followed by . Command: DEFINEWORD This is the command that asks for the defintion of a word from the dictionary. The possible response are: WILD0 or WILD . . . A WILD response is given when the word to be defined contained wildcard characters ('%' which matches exactly one character, or '*' which matches 0 or more characters). If the wild string had no matches, a WILD response with argument 0 is returned. If there are one or more matches, a WILD with no arg is returned, and then the matching words are sent, one per line, followed by an EOF packet. For each returned word there is a word#, a string of ASCII digits representing a decimal number. For user convenience, that word# may be specified in place of the word itself, in a DEFINE request. SPELL0 or SPELL { same response as WILD } When a word is specified that couldn't be found verbatim, Webster attempts to Do What You Mean, and try to fix common typos (transposed letter, one missing or one additional letter, or one letter wrong). If any such matches are found, a SPELL response is returned, listing all the "possible" words. If no such words were found, (e.g. it couldn't make ANY sense out of the input word), a SPELL with argument 0 is returned. DEFINITIONn then n { WILD-response-like lines } then A DEFINITION response means the word matched an entry, and the definition follows. The argument (always present), n, is the # of cross-references in the definition that might prove interesting. If n > 0, then follows one line per cross-reference, in the same fork as the WILD responses. Then comes the body of the definition, followed by and Command: COMPLETEword Is used to simulate is action of the TENEX/TWENEX completion feature. "word" is usually the beginning portion of a word that is expected to be unique. The response is either AMBIGUOUSn or COMPLETIONfull-word If the partial word you specified matches zero or more than one dictionary entry, an AMBIGUOUS response is given, the argument being the number of matches. If the partial word matches one and only one entry, a COMPLETION reply is sent back, containing the full text of the word that was completed. Note that COMPLETION and wildcard characters CAN be mixed, so the user program should check the word being completed, and if any wildcard characters exist (in the supplied part), the entire word should be retyped, not just what was competed. Command: ENDINGSword This command is used to simulate the "?" TENEX/TWENEX feature. The response is either ENDINGS0 or ENDINGS { WILD-like word-list } What ENDINGS actually does is append a "*" to the word you gave and check for WILD matches. If there were none, you get the ENDINGS with argument 0 response, else a WILD-like list of words. NOTE that even tho the word-line returned have a word#, that number does not work the same as for WILD or SPELLING. A number is present on the line so that the response is in the same format as that of WILD or SPELLING, to make it a little easier on the user program. Those number shouldn't be passed back as they don't mean anything. Command: SPELLword The SPELL command is for people who want to (ab)use the dictionary server as a SPELL server. The word is looked up, and if it matches zero or one entries you get a SPELLmatches response where matches is 0 or 1. If the word isn't found, but has possible alternate spellings, those are returned exactly like a SPELLING response to DEFINE. OWEBSTER protocol (seems to be) Client sends a WORD, followed by newline Server sends back definition followed by a blank line.