Exemplo n.º 1
0
 /// <summary>
 /// Sends a message to peer
 /// </summary>
 /// <param name="opCode"></param>
 public void SendMessage(short opCode)
 {
     SendMessage(MessageHelper.Create(opCode), DeliveryMethod.Reliable);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Sends a message to peer
 /// </summary>
 /// <param name="opCode"></param>
 /// <param name="packet"></param>
 /// <param name="method"></param>
 public void SendMessage(short opCode, ISerializablePacket packet, DeliveryMethod method)
 {
     SendMessage(MessageHelper.Create(opCode, packet), method);
 }
Exemplo n.º 3
0
        /// <summary>
        /// Sends a message to peer
        /// </summary>
        /// <param name="opCode"></param>
        /// <param name="data"></param>
        /// <param name="responseCallback"></param>
        public void SendMessage(short opCode, string data, ResponseCallback responseCallback)
        {
            var message = MessageHelper.Create(opCode, data);

            SendMessage(message, responseCallback);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Sends a message to peer
        /// </summary>
        /// <param name="opCode"></param>
        /// <param name="data"></param>
        /// <param name="responseCallback"></param>
        /// <param name="timeoutSecs"></param>
        public void SendMessage(short opCode, int data, ResponseCallback responseCallback, int timeoutSecs)
        {
            var message = MessageHelper.Create(opCode, data);

            SendMessage(message, responseCallback, timeoutSecs);
        }
Exemplo n.º 5
0
 /// <summary>
 /// Sends a message to peer
 /// </summary>
 /// <param name="opCode"></param>
 /// <param name="responseCallback"></param>
 public void SendMessage(short opCode, ResponseCallback responseCallback)
 {
     SendMessage(MessageHelper.Create(opCode), responseCallback);
 }
Exemplo n.º 6
0
        /// <summary>
        /// Sends a message to peer
        /// </summary>
        /// <param name="opCode"></param>
        /// <param name="data"></param>
        /// <param name="ackCallback"></param>
        public void SendMessage(short opCode, byte[] data, ResponseCallback ackCallback)
        {
            var message = MessageHelper.Create(opCode, data);

            SendMessage(message, ackCallback);
        }
Exemplo n.º 7
0
        /// <summary>
        /// Sends a message to peer
        /// </summary>
        /// <param name="opCode"></param>
        /// <param name="packet"></param>
        /// <param name="responseCallback"></param>
        /// <param name="timeoutSecs"></param>
        public void SendMessage(short opCode, ISerializablePacket packet, ResponseCallback responseCallback, int timeoutSecs)
        {
            var message = MessageHelper.Create(opCode, packet.ToBytes());

            SendMessage(message, responseCallback, timeoutSecs, DeliveryMethod.Reliable);
        }
Exemplo n.º 8
0
        /// <summary>
        /// Sends a message to peer
        /// </summary>
        /// <param name="opCode"></param>
        /// <param name="packet"></param>
        /// <param name="responseCallback"></param>
        public void SendMessage(short opCode, ISerializablePacket packet, ResponseCallback responseCallback)
        {
            var message = MessageHelper.Create(opCode, packet.ToBytes());

            SendMessage(message, responseCallback);
        }
Exemplo n.º 9
0
 public void Respond(int response, ResponseStatus statusCode = ResponseStatus.Default)
 {
     Respond(MessageHelper.Create(OpCode, response), statusCode);
 }
Exemplo n.º 10
0
 /// <summary>
 ///     Respond with data (message is created internally)
 /// </summary>
 /// <param name="data"></param>
 /// <param name="statusCode"></param>
 public void Respond(ISerializablePacket packet, ResponseStatus statusCode = ResponseStatus.Default)
 {
     Respond(MessageHelper.Create(OpCode, packet.ToBytes()), statusCode);
 }
Exemplo n.º 11
0
 /// <summary>
 ///     Respond with data (message is created internally)
 /// </summary>
 /// <param name="data"></param>
 /// <param name="statusCode"></param>
 public void Respond(byte[] data, ResponseStatus statusCode = ResponseStatus.Default)
 {
     Respond(MessageHelper.Create(OpCode, data), statusCode);
 }