next up previous contents index
Next: Executing Commands Up: Communication Interfaces Previous: Communication Interfaces

Connecting to a MIDAS server

There are two ways of connecting a MIDAS client  (which may be a MIDAS session or a separate process) to a MIDAS server (which we also call background MIDAS)  already running:

Using ASCII files limits the connections between client and server to the same host or different hosts sharing disks. On the other hand we can bridge different host systems, like e.g. Unix and Basic based systems. Furthermore, the background MIDAS can be used interactively as well.

Connections based on sockets can be established on the same host or over a network but are limited to Unix systems supporting sockets. The background MIDAS session has to be set in a special background mode (via SET/BACKGROUND sockets) where it's waiting on input via sockets and thus not available for interactive usage anymore.

The routine XCZOPN will establish a connection to a MIDAS server based on ASCII files, whereas XCXOPN will use sockets as the transport mechanism  for the connection  with the server. XCZOPN or XCXOPN must be called before any of the other communication interfaces can be used, and assume that a background MIDAS has been started already. Furthermore, for XCXOPN the command SET/BACKGROUND sockets must have been executed in the background Midas session before.

The interface XCXSTA checks the status of the background MIDAS and returns a busy or idle state of the MIDAS server.

With XCXCLO the connection to a MIDAS server is closed from the client side.

If a background MIDAS session is not running yet, one can start a MIDAS session, set it into background mode and connect to that MIDAS session via the XCXINI and XCZINI interfaces. Within XCXINI the routine XCXOPN is used and XCZOPN with XCZINI. Currently, it is only possible to start a background MIDAS on the same host.

In case of a socket based connection we can get the file descriptor of that socket via XCXGFD.

With the interface XCXSTP the connection is closed and also the connected MIDAS session is terminated.


next up previous contents index
Next: Executing Commands Up: Communication Interfaces Previous: Communication Interfaces
Send comments to web@eso.org
Last update: 1998-10-23