//SYNC_WITH_RSP, request is not void private unsafe void _t_protocol_name_2Handler(t_protocol_typeArgs args) { var rsp = new t_protocol_responseWriter(); t_protocol_nameHandler(new t_protocol_requestReader(args.Buffer, args.Offset), rsp); *(int *)(rsp.m_ptr - TrinityProtocol.MsgHeader) = rsp.Length + TrinityProtocol.TrinityMsgHeader; args.Response = new TrinityMessage(rsp.buffer, rsp.Length + TrinityProtocol.MsgHeader); }
//SYNC and ASYNC, no response; private unsafe void _t_protocol_nameHandler(t_protocol_typeArgs args) { IF("$t_protocol->has_request()"); t_protocol_nameHandler(new t_protocol_requestReader(args.Buffer, args.Offset)); ELSE(); t_protocol_nameHandler(); END(); }
private unsafe void _t_protocol_name_3Handler(t_protocol_typeArgs args) { var rsp = new t_protocol_responseWriter(); t_protocol_nameHandler(rsp); *(int *)(rsp.CellPtr - TrinityProtocol.MsgHeader) = rsp.Length + TrinityProtocol.TrinityMsgHeader; args.Response = new TrinityMessage(rsp.buffer, rsp.Length + TrinityProtocol.MsgHeader); }
//("!$t_protocol->has_request() && $t_protocol->is_asyn_req_rsp_protocol()") private unsafe void _t_protocol_name_5Handler(t_protocol_typeArgs args) { using (var rsp = new t_protocol_responseWriter(asyncRspHeaderLength: TrinityProtocol.AsyncWithRspAdditionalHeaderLength)) { Exception exception = null; try { t_protocol_nameHandler(rsp); } catch (Exception ex) { exception = ex; } int token = *(int *)(args.Buffer + args.Offset); int from = *(int *)(args.Buffer + args.Offset + sizeof(int)); _t_protocol_name_CheckError(exception, token, from); *(int *)(rsp.buffer) = TrinityProtocol.TrinityMsgHeader + TrinityProtocol.AsyncWithRspAdditionalHeaderLength + rsp.Length; *(TrinityMessageType *)(rsp.buffer + TrinityProtocol.MsgTypeOffset) = TrinityMessageType.ASYNC_WITH_RSP; *(ushort *)(rsp.buffer + TrinityProtocol.MsgIdOffset) = (ushort)global::t_Namespace.TSL.t_base_class_name.t_comm_name.t_protocol_typeMessageType.t_protocol_name__Response; *(int *)(rsp.m_ptr - TrinityProtocol.AsyncWithRspAdditionalHeaderLength) = token; *(int *)(rsp.m_ptr - TrinityProtocol.AsyncWithRspAdditionalHeaderLength + sizeof(int)) = 0; IF("node->type() == PGT_MODULE"); this.SendMessage(m_memorycloud[from], rsp.buffer, rsp.Length + TrinityProtocol.MsgHeader + TrinityProtocol.AsyncWithRspAdditionalHeaderLength); ELSE(); Global.CloudStorage[from].SendMessage(rsp.buffer, rsp.Length + TrinityProtocol.MsgHeader + TrinityProtocol.AsyncWithRspAdditionalHeaderLength); END(); } }