Exemple #1
0
 /// <summary>
 ///     Processes the received packet.
 /// </summary>
 private static void ProcessReceive(byte[] buffer)
 {
     if (buffer != null)
     {
         NetMessaging.OnReceive(buffer, buffer.Length);
     }
 }
Exemple #2
0
        /// <summary>
        ///     Sends the specified message.
        /// </summary>
        internal static void Send(int serviceNodeType, int serviceNodeId, NetMessage message, byte[] sessionId = null)
        {
            NetSocket destinationSocket = NetManager.GetServiceNodeEndPoint(serviceNodeType, serviceNodeId);

            if (destinationSocket != null)
            {
                NetMessaging.Send(destinationSocket, message, sessionId);
            }
        }