public unsafe static t_protocol_responseReader t_method_name_2(this Trinity.Storage.IMessagePassingEndpoint storage, t_protocol_requestWriter msg) { byte *bufferPtr = msg.buffer; *(int *)(bufferPtr) = msg.Length + TrinityProtocol.TrinityMsgHeader; *(TrinityMessageType *)(bufferPtr + TrinityProtocol.MsgTypeOffset) = __meta.META_OUTPUT("get_comm_protocol_trinitymessagetype($t_protocol)");; *(ushort *)(bufferPtr + TrinityProtocol.MsgIdOffset) = (ushort)global::t_Namespace.TSL.t_base_class_name.t_comm_name.t_protocol_typeMessageType.t_protocol_name; TrinityResponse response; t_send_message(bufferPtr, msg.Length + TrinityProtocol.MsgHeader, out response); return(new t_protocol_responseReader(response.Buffer, response.Offset)); }
//("$t_protocol->has_request() && $t_protocol->is_asyn_req_rsp_protocol()") public unsafe static Task <t_protocol_responseReader> t_method_name_3(this Trinity.Storage.IMessagePassingEndpoint storage, t_protocol_requestWriter msg) { byte **bufferPtrs = stackalloc byte *[2]; int * size = stackalloc int[2]; byte * bufferPtr = stackalloc byte[TrinityProtocol.MsgHeader + TrinityProtocol.AsyncWithRspAdditionalHeaderLength]; bufferPtrs[0] = bufferPtr; bufferPtrs[1] = msg.buffer + TrinityProtocol.MsgHeader; size[0] = TrinityProtocol.MsgHeader + TrinityProtocol.AsyncWithRspAdditionalHeaderLength; size[1] = msg.Length; int token = Interlocked.Increment(ref t_comm_nameBase.s_t_protocol_name_token_counter); var task_source = new TaskCompletionSource <t_protocol_responseReader>(); t_comm_nameBase.s_t_protocol_name_token_sources[token] = task_source; *(int *)(bufferPtr) = TrinityProtocol.TrinityMsgHeader + msg.Length + TrinityProtocol.AsyncWithRspAdditionalHeaderLength; *(TrinityMessageType *)(bufferPtr + TrinityProtocol.MsgTypeOffset) = __meta.META_OUTPUT("get_comm_protocol_trinitymessagetype($t_protocol)");; *(ushort *)(bufferPtr + TrinityProtocol.MsgIdOffset) = (ushort)global::t_Namespace.TSL.t_base_class_name.t_comm_name.t_protocol_typeMessageType.t_protocol_name; *(int *)(bufferPtr + TrinityProtocol.MsgHeader) = token; *(int *)(bufferPtr + TrinityProtocol.MsgHeader + sizeof(int)) = Global.CloudStorage.MyInstanceId; t_send_message(bufferPtrs, size, 2); return(task_source.Task); }
public unsafe /*IF("node->type() != PGT_MODULE")*/ static /*END*/ t_protocol_responseReader t_method_name_2([META_OUTPUT("%arg_extension_method_target")] int partitionId, t_protocol_requestWriter msg) { return(t_comm_name.MessagePassingExtension.t_protocol_name_2(t_storage[partitionId], msg)); }
public unsafe /*IF("node->type() != PGT_MODULE")*/ static /*END*/ void t_method_name([META_OUTPUT("%arg_extension_method_target")] int t_comm_id, t_protocol_requestWriter msg) { byte *bufferPtr = msg.buffer; try { *(int *)(bufferPtr) = msg.Length + TrinityProtocol.TrinityMsgHeader; *(bufferPtr + TrinityProtocol.MsgTypeOffset) = (byte)__meta.META_OUTPUT("get_comm_protocol_trinitymessagetype($t_protocol)");; *(ushort *)(bufferPtr + TrinityProtocol.MsgIdOffset) = (ushort)global::t_Namespace.TSL.t_base_class_name.t_comm_name.t_protocol_typeMessageType.t_protocol_name; t_send_message(t_comm_id, bufferPtr, msg.Length + TrinityProtocol.MsgHeader); } finally { } }
public unsafe static void t_method_name(this Trinity.Storage.IMessagePassingEndpoint storage, t_protocol_requestWriter msg) { byte *bufferPtr = msg.buffer; try { *(int *)(bufferPtr) = msg.Length + TrinityProtocol.TrinityMsgHeader; *(bufferPtr + TrinityProtocol.MsgTypeOffset) = (byte)__meta.META_OUTPUT("get_comm_protocol_trinitymessagetype($t_protocol)");; *(ushort *)(bufferPtr + TrinityProtocol.MsgIdOffset) = (ushort)global::t_Namespace.TSL.t_base_class_name.t_comm_name.t_protocol_typeMessageType.t_protocol_name; t_send_message(bufferPtr, msg.Length + TrinityProtocol.MsgHeader); } finally { } }