public void SendMessage(short opCode, ISerializablePacket packet, ResponseCallback responseCallback, int timeoutSecs) { var message = MessageHelper.Create(opCode, packet.ToBytes()); SendMessage(message, responseCallback, timeoutSecs, EDeliveryMethod.Reliable); }
public void SendMessage(short opCode, ISerializablePacket packet, ResponseCallback responseCallback, int timeoutSecs) { var msg = MessageHelper.Create(opCode, packet.ToBytes()); Peer.SendMessage(msg, responseCallback, timeoutSecs); }
/// <summary> /// Respond with data (message is created internally) /// </summary> /// <param name="data"></param> /// <param name="statusCode"></param> public void Respond(ISerializablePacket packet, EResponseStatus statusCode = EResponseStatus.Default) { Respond(MessageHelper.Create(OpCode, packet.ToBytes()), statusCode); }
public void SendMessage(short opCode, ISerializablePacket packet, ResponseCallback responseCallback) { var message = MessageHelper.Create(opCode, packet.ToBytes()); SendMessage(message, responseCallback); }
public static IMessage Create(ushort opCode, ISerializablePacket packet) { return(Create(opCode, packet.ToBytes())); }
public void SendMessage(short opCode, ISerializablePacket packet, DeliveryMethod method) { var msg = MessageHelper.Create(opCode, packet.ToBytes()); Peer.SendMessage(msg, method); }
/// <summary> /// Creates a message by serializing a packet /// </summary> /// <param name="opCode"></param> /// <param name="packet"></param> /// <returns></returns> public IMessage Message(short opCode, ISerializablePacket packet) { return(MessageHelper.Create(opCode, packet.ToBytes())); }
/// <summary> /// Create message from packet /// </summary> /// <param name="opCode"></param> /// <param name="packet"></param> /// <returns></returns> public static IOutgoingMessage Create(short opCode, ISerializablePacket packet) { return Create(opCode, packet.ToBytes()); }