endurox.tpsend¶
- endurox.tpsend(cd: int, idata: object, flags: int = 0) endurox.TpSendRet ¶
Send conversational data to connected peer. In case if
TPEEVENT
error is received, exception is not thrown, instead event code is loaded into revent return value. In case if event is not generated, revent is set to 0.tpsend example¶cd = e.tpconnect("CONVSV", {"data":"HELLO"}, e.TPSENDONLY) tperrno, revent = e.tpsend(cd, {"data":"HELLO"})
For more details see tpsend(3) C API call.
- Raises:
AtmiException –
- Parameters:
cd (int) – Conversation descriptor.
idata (dict) – ATMI buffer to send.
flags (int) – Bitwise or’d
TPRECVONLY
,TPNOBLOCK
,TPSIGRSTRT
,TPNOTIME
.
- Returns:
int –
- tperrno - error code (0 or
TPEEVENT
). For other errors, exceptions thrown.
- tperrno - error code (0 or
int –
- tpurcode - return code passed to
tpreturn()
. Value is loaded in case if revent returned is
TPEV_SVCFAIL
orTPEV_SVCSUCC
, otherwise previous tpurcode is returned.
- tpurcode - return code passed to
int – revent - In case if
TPEEVENT
tperrno was returned, may contain:TPEV_DISCONIMM
,TPEV_SENDONLY
,TPEV_SVCERR
,TPEV_SVCFAIL
,TPEV_SVCSUCC
.