public override void ProccessEvent(MsgBase tmpMsg) { switch (tmpMsg.msgId) { case (ushort)UDPEvent.eInitail: UDPMsg msg = (UDPMsg)tmpMsg; socket = new UDPSocket(); socket.BindSocket(msg.port, msg.recvBufferLength, msg.recvDelegate); break; case (ushort)UDPEvent.eSendTo: UDPSendMsg sendMsg = (UDPSendMsg)tmpMsg; socket.SendData(sendMsg.ip, sendMsg.data, sendMsg.port); break; default: break; } }
public override void ProcessEvent(MsgBase msg) { switch (msg.msgID) { case (ushort)UDPEvent.Initial: { UDPMsg tmpMsg = (UDPMsg)msg; netUdpSocket = new NetUdpSocket(); netUdpSocket.BindSocket(tmpMsg.port, tmpMsg.recvBufferLength, tmpMsg.recvDelegate); } break; case (ushort)UDPEvent.SendTo: { UDPSendMsg tmpSendMsg = (UDPSendMsg)msg; netUdpSocket.SendData(tmpSendMsg.ip, tmpSendMsg.port, tmpSendMsg.data); } break; } }
public override void ProcessEvent(MsgBase Msg) { switch (Msg.msgid) { case (ushort)UDPEvent.SendTo: { UDPSendMsg tmpSendMsg = (UDPSendMsg )Msg; uDPSocket.SendData(tmpSendMsg.ip, tmpSendMsg.data, tmpSendMsg.port); } break; case (ushort)UDPEvent.Initial: { UDPMSg tmpMsg = (UDPMSg)Msg; uDPSocket = new UDPSocket(); uDPSocket.BindSocket(tmpMsg.port, tmpMsg.recvBufferLength, tmpMsg.recvDelegate); } break; } }
public override void ProcessEvent(MsgBase msg) { switch ((UDPEvent)msg.msgId) { case UDPEvent.Initial: UDPMsg udpMsg = (UDPMsg)msg; udpSocketBase = new UDPSocketBase(); udpSocketBase.BindSocket(udpMsg.port, udpMsg.recvBufferLength, udpMsg.recvDelegate); break; case UDPEvent.SendTo: UDPSendMsg sendMsg = (UDPSendMsg)msg; udpSocketBase.SendData(sendMsg.ip, sendMsg.data, sendMsg.port); break; default: break; } }