/// <summary> /// 测试用的发送协议 /// </summary> /// <param name="body">要发送的网络协议</param> /// <param name="rspProtoId">期望收到的响应Id</param> /// <param name="timeOutHandler">协议响应超时的处理处理方法</param> public void SendTcpClientMessage(ProtoID rspProtoId, ProtoBody body, Action timeOutHandler, bool isShowWaiting = false) { //protoTimes[rspProtoId] = Time.realtimeSinceStartup; //timeOutHandlers[rspProtoId] = timeOutHandler; TimeOutData data = new TimeOutData(rspProtoId, timeOutHandler); int dataIndex = timeOutHandlers.IndexOf(data); if (dataIndex > 0) { timeOutHandlers[dataIndex].StartTime = Time.realtimeSinceStartup; } else { timeOutHandlers.Add(data); } SendTcpClientMessage(body); }
public int AddProcess(ProtoBody body) { return(AddProcess(new Process(body))); }
public Process(ProtoBody body) { Specification = body; processID = ProtoID.GetProtoIDByBody(body); }
public void SendTcpClientMessage(ProtoBody protoBody) { networkCtrl.SendMessage(mTcpClientSessionId, protoBody); }
public void SendTcpServerMessage(ProtoBody protoBody) { networkCtrl.SendMessage(mTcpServerSessionId, protoBody); }
public void SendTcpClientMessage(ProtoID rspProtoId, ProtoBody protoBody) { Protocol proto = new Protocol(rspProtoId, protoBody); networkCtrl.SendMessage(mTcpClientSessionId, proto); }