This extension provides a set of procedures, that can be used to communicate with dict-servers.At the moment of this writing it supports almost all commands of the dict-protocol.authentication and mime-headers are currently not supported, but will be once the needed extensions are available.

Connects to the dict-server with the specified port or the default-port as specified in rfc22229 (2628). Once the connection is established, the server's banner is parsed and information are extracted. Finally the procedure issues a client-command with the specified client-string as parameter. The value for timout is directly used to set the timeout for tcp-connect. The procedure returns a connection-object on success or signals an error otherwise.

[procedure](disconnect CONNECTION) => BOOL

Closes the connection represented by CONNECTION and sets its status to disconnected. Returns #t if the connection was closes successfully or false otherwise.

Sometimes you might want to see what happens when you use the extension. For those cases there is support for logging input and output.

[parameter] *current-log-port*

Set this to a port and the extension will log all input send and all output retrieved from the server to this port. If you want to disable logging, set it to #f. It defaults to #f, so logging is disabled.

In case of an error the command-procedures return the status-response send by the server. In order to identify a status or present an error-message to the user, there are procedures that deal with status-response-objects

[procedure](status-response? RESP) => BOOL

Check if a response is a status-response.

[procedure](response-status-error? STATUS-RESPONSE) => BOOL

Checks if the given status-response represents an error.

[procedure](response-status-code STATUS-RESPONSE) => FIXNUM

Retrieve the status-code (a positive fixnum) of the STATUS-RESPONSE.

[procedure](response-status-message STATUS-RESPONSE) => STRING

Retrieve the textual information send by the server for this STATUS-RESPONSE

Generally all commands return two values. The first value is a boolean indicating success or failure of the operation. The second value depends on the operation performed. In the case of a failure all commands return the status-response send by the server as the second value.

Performs a match-operation on the dict-server for the given word. The strategy to use can be specified by the key-word-argument strategy. It defaults to the symbol 'default which means: "Use the default-strategy". The default-strategy is server-dependent. Legal values for the strategy are:

a string => the name of a strategy (see !strategies)

the symbol 'default => this means use the default strategy

The db key-word-argument specifies the database to search. Legal values for db are:

a string => the name of a database (see !databases)

the symbol 'first => this means search all databases and stop after the first match

the symbol 'all => this means search all databases and return all matches