Update of "Embedding"

Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview

Artifact ID: c68677d586e72ce0c686a0759553ba21b41db693
Page Name:Embedding
Date: 2012-11-06 17:06:12
Original User: oehhar
Parent: b367a5d023a6aa2649cc451ec0777b67f035771a
Content

Contents

Loading the Webservices Server Package

To load the webservices server package, do:

 package require WS::Embedded

This command will only load the server the first time it is used, so it causes no ill effects to put this in each file declaring a service or service procedure.


Specify a Port to Receive Request on

Procedure Name : ::WS::Embeded::Listen

Description : Instruct the module to listen on a Port, security information.

Arguments : this procedure uses position dependent arguments, they are:

     port     -- Port number to listen on.
     certfile -- Name of the certificate file. Defaults to {}.
     keyfile  -- Name of the key file. Defaults to {}.
     userpwds -- A list of username:password. Defaults to {}.
     realm    -- The seucrity realm. Defaults to {}.

Returns : Handle of socket

Side-Effects : None

Exception Conditions :  : None

Pre-requisite Conditions : None


Enter the event queue

To serve any requests, the interpreter must enter the event queue using, for example:

     vwait waitVariable

Stop the server

To stop serving requests, the server socket may be closed. The socket handle was returned by ::WS::Embeded::Listen. Optionally, the event queue may be stopped as follows:

     close $handle
     set waitVariable 1