Daylight v4.9
Release Date: 1 February 2008


dt_thor_server - connect to a server

Generic Prototype

dt_thor_server(dt_String, dt_String, dt_String, dt_String, dt_Integer *)
=> dt_Handle

C Prototype

#include "dt_thor.h"

dt_Handle dt_thor_server(dt_Integer hlen, dt_String host, dt_Integer slen, dt_String service, dt_Integer ulen, dt_String userid, dt_Integer plen, dt_String passwd, dt_Integer *isnew)

FORTRAN Prototype

include ''

integer*4 dt_f_thor_server(host, service, userid, passwd, isnew)

character*() host
character*() service
character*() userid
character*() passwd
integer*4 isnew


Connects to a server. Returns a server object (TYP_SERVER). If the connection already exists, returns the original handle allocated for the server.

The parameter 'host' is a hostname or network address ("day", or "").

The parameter 'service' name the service (IPC port address) at which the server listens for connections on the host machine. On UNIX machines, these services are listed in the file /etc/services, or are supplied by a NIS (Network Information Services) server. Typical values are "thor" and "merlin". To override values listed in /etc/services (or if /etc/services is not available), a port may be substituted (eg. "5555").

The parameters 'userid' and 'password' are used to authenticate the identity of the user making the connection.

The parameter 'isnew' indicates whether the returned handle represents a newly-allocated server connection, or represents an existing connection. If 'isnew' if FALSE, the client was already connected to the specified server and the handle returned represents an object which was allocated by a previous call to this function.

Return Value

Returns a handle for a server object, or the NULL_OB if an error is encountered. Reasons that the connection may fail include:
- no server is running on the specified host,
- the network between the client and server is not functioning,
- the userid and password combination are invalid for the server,
- the client machine is not authorized to connect to the server,
- all of the server's licenses for connections are in use.

Related Topics

dt_getdatabases(3) dt_getdatatype(3) dt_getpasswords(3) dt_getsearchpath(3) dt_getusers(3) dt_hold(3) dt_isopen(3) dt_ispublic(3) dt_open(3) dt_ping(3) dt_release(3) dt_server(3) dt_setpassword(3) dt_setsearchpath(3) dt_thor_createdb(3)