For information on converting to InterSystems IRIS,
see the InterSystems IRIS Adoption Guide
and the InterSystems IRIS In-Place Conversion Guide,
both available on the WRC Distributions page (login required).
Until pTimeout, wait for an inbound TCP connection to be received on the port specified in the prior Open() call.
Note that the OS may accept up to ConnectionQueueSize connections for the port on your behalf before you call this method.
If the OS has queued one or more accepted connections, this method will return immediately with one of them connected.
Until pTimeout, listen for incoming connections and spawn a job for each one, up to pMaxJobs. If pMaxJobs
threshold has already been reached, wait for an existing connected job to quit and then spawn a job for the new connection.
When the timeout expires, this method will return but any spawned jobs will continue running until they terminate on their own.
pOnConnectedClass is the classname of a customer defined class that must contain a classmethod called OnConnected(). ListenJob() will arrange for this classmethod to be called each time a new connection arrives. It will call OnConnected() with 2 arguments, a %IO.ServerSocket instance representing the connected socket, and a string that was passed in to ListenJob() in the pJobArgs argument. This allows the OnConnected() method to engage in TCP communications over the socket from within a fresh job created for the purpose.
The pSocketClass argument to ListenJob() allows you to specify a subclass of %IO.ServerSocket should be instantiated in the connection jobs. This could implement additional methods for handling common protocol elements expected to be exchanged across the TCP connection. Normally you will just use %IO.ServerSocket and its Read() and Write() methods.
The pDummy argument is ignored.