Contents Up Previous Next

Server

Interprocess communication overview

A server object represents the server side of a DDE conversation.

To delete a server object, use object-delete.

server-create


server-create

long ( server-create string service-name)

Creates a server object, and returns an integer id if successful.

service-name is a string identifying this service to potential clients. Under UNIX, it should contain a valid port number.

The application should use window-add-callback to register the window callback OnAcceptConnection or OnAcceptConnectionEx, which will be called when a client requests a connection.

OnAcceptConnection will be called with arguments:

  1. server id (long)
  2. the name of the topic in which the client is interested (string)
  3. tentative connection id (long)

If this function returns zero, the connection is rejected and deleted, otherwise it is confirmed. See also connection.

OnAcceptConnectionEx will be called with arguments:

  1. server id (long)
  2. the name of the topic in which the client is interested (string)

This form assumes that the connection object will be created with connection-create from within the callback.