Receive one message. The operation is blocking -- it returns when it receives any message or it times out. Parameters ---------- timeout : int, optional The timeout value in milliseconds. If zero, wait indefinitely. Returns ------- msg : RPCMessage
(timeout=0)
| 1072 | |
| 1073 | |
| 1074 | def recv_rpc_message(timeout=0): |
| 1075 | """Receive one message. |
| 1076 | |
| 1077 | The operation is blocking -- it returns when it receives any message |
| 1078 | or it times out. |
| 1079 | |
| 1080 | Parameters |
| 1081 | ---------- |
| 1082 | timeout : int, optional |
| 1083 | The timeout value in milliseconds. If zero, wait indefinitely. |
| 1084 | |
| 1085 | Returns |
| 1086 | ------- |
| 1087 | msg : RPCMessage |
| 1088 | One rpc message received from the target, or None if it times out. |
| 1089 | |
| 1090 | Raises |
| 1091 | ------ |
| 1092 | ConnectionError if there is any problem with the connection. |
| 1093 | """ |
| 1094 | msg = _CAPI_DGLRPCCreateEmptyRPCMessage() |
| 1095 | status = _CAPI_DGLRPCRecvRPCMessage(timeout, msg) |
| 1096 | return msg if status == 0 else None |
| 1097 | |
| 1098 | |
| 1099 | def client_barrier(): |
no outgoing calls
no test coverage detected