om.XmlWriter.createSocketWriter
Creates an om.SaxDocumentHandler
object
writing to a socket.
Syntax
om.XmlWriter.createSocketWriter(
host STRING,
port INTEGER )
RETURNS om.SaxDocumentHandler
- host is the name of the host computer listening to the TCP port.
- port is the port number to connect to.
Usage
The om.XmlWriter.createSocketWriter()
class method creates an
om.SaxDocumentHandler
object that will write to a socket
identified by the host and port number passed as parameters. XML data will be send
through the socket when using the om.SaxDocumentHandler
methods.
If the socket cannot be opened, the method returns NULL
.
No timeout is used.
Example
DEFINE w om.SaxDocumentHandler
...
LET w = om.XmlWriter.createSocketWriter("myhost",8012)
IF w IS NULL THEN
ERROR "Could not open socket."
EXIT PROGRAM 1
END IF
...