Structural Informatics Group (SIG) logo
Home | Projects | Demos | Downloads | Publications | Local Info | About Us | New site
Go to the first, previous, next, last section, table of contents.

net-eval

source files: xnet.[ch]

SYNTAX

(NET-EVAL  <expr> &key :SOCKET  )

DESCRIPTION

The NET-EVAL function sends an s-sexpr to an slisp server for evaluation, over the current socket, as set by NET-SET-SOCKET. <expr> is a valid s-sexpr, of the form expected by the lisp EVAL function. If the keyword :SOCKET is defined and followed by an open socket number <socket>, the expression is sent over <socket> instead of the socket number specified by NET-SET-SOCKET. The current socket number is only overridden for the duration of this function, and remains valid for other calls to NET-EVAL in which the :SOCKET keyword is not set.

If the server generates an error the normal xlisp error protocol is utilized to transfer control to the top level of slisp.

If no error is found the return value depends on the string value returned by the server. If the string constitutes a single valid s-expression then the s-expression is read by the lisp read function, and the return value is the same as would be expected with the lisp eval function. If after reading the s-expression the reader encounters more input, then the entire returned string is returned as a string. This is to allow for the fact that the server may output strings using the PRINT or FORMAT functions, in addition to the values of any expressions.


Go to the first, previous, next, last section, table of contents.