swat.cas.connection.getnext

swat.cas.connection.getnext(*objs, **kwargs)

Return responses as they appear from multiple connections

Parameters
*objsCAS objects and/or CASAction objects

Connection/CASAction objects to watch for responses.

timeoutint, optional

Timeout for waiting for a response on each connection.

datamsghandlerCASDataMsgHandler object, optional

The object to use for data messages from the server.

Returns
CASResponse object

See also

CAS.invoke()

Examples

>>> conn1 = swat.CAS()
>>> conn2 = swat.CAS()
>>> conn1.invoke('serverstatus')
>>> conn2.invoke('userinfo')
>>> for resp in getnext(conn1, conn2):
...     for k, v in resp:
...         print(k, v)