/// <summary>
 /// </summary>
 /// <param name="dataObject">
 /// </param>
 public void Send(MessageBase dataObject)
 {
     var temp = new DynamicMessage();
     temp.DataObject = dataObject;
     this.Send(temp);
 }
 /// <summary>
 /// </summary>
 /// <param name="dataObject">
 /// </param>
 public void Send(DynamicMessage dataObject)
 {
     MessagePackSerializer<object> serializer = MessagePackSerializer.Create<object>();
     byte[] data = serializer.PackSingleObject(dataObject);
     byte[] finalData = new byte[8 + data.Length];
     BitConverter.GetBytes(0x00ff55aa).CopyTo(finalData, 0);
     BitConverter.GetBytes(data.Length).CopyTo(finalData, 4);
     Array.Copy(data, 0, finalData, 8, data.Length);
     this.clientBase.Send(finalData);
 }
Esempio n. 3
0
 /// <summary>
 /// </summary>
 /// <param name="messageobject">
 /// </param>
 internal void ProcessISComMessage(DynamicMessage messageobject)
 {
     // Switch to handlers
     if (messageobject.DataObject is ChatCommand)
     {
         this.HandleChatCommand((ChatCommand)messageobject.DataObject);
     }
 }
 /// <summary>
 /// </summary>
 /// <param name="dataObject">
 /// </param>
 public void Send(DynamicMessage dataObject)
 {
     MessagePackSerializer<object> serializer = MessagePackSerializer.Create<object>();
     byte[] data = serializer.PackSingleObject(dataObject);
     byte[] header = new byte[8];
     BitConverter.GetBytes(0x00ff55aa).CopyTo(header, 0);
     BitConverter.GetBytes(data.Length).CopyTo(header, 4);
     this.Send(header);
     this.Send(data);
 }
Esempio n. 5
0
 /// <summary>
 /// </summary>
 /// <param name="messageobject">
 /// </param>
 private static void ISComClientOnReceiveData(DynamicMessage messageobject)
 {
     zoneServer.ProcessISComMessage(messageobject);
 }