コード例 #1
0
        public UnityChannelManager()
        {
            var configuration = ConfigurationManager.Get <IUnityConnection>();

            m_commServer                 = new UnityCommServer(configuration.Port);
            m_commServer.OnMessage      += CommServer_OnMessage;
            m_commServer.OnClientKilled += CommServer_OnClientKilled;
            m_channels = new Dictionary <string, IChannel>();
            Debug.WriteLine(this, "Gestor de canales Unity iniciado. Recibiendo conexiones en el puerto: " + configuration.Port, VerbosityLevel.Info);
        }
コード例 #2
0
 /// <summary>
 /// Crear nuevo canal
 /// </summary>
 /// <param name="unityId">Identificador de Unity</param>
 /// <param name="commServer">Servidor de comunicaciones a utilizar</param>
 public UnityChannel(string unityId, UnityCommServer commServer)
 {
     UnityId                      = unityId;
     m_unityCommServer            = commServer;
     m_unityCommServer.OnMessage += UnityCommServer_OnMessage;
 }