public void SetListener(string pipeName, string server)
        {
            listenerPipe   = NamedPipeStream.Open(pipeName, server, NamedPipeStream.PipeDirection.InOut);
            listenerSender = new StreamServiceSender <IKinectListener>(listenerPipe);
            listener       = listenerSender.Service;

            listener.OnLogMessageReceived($"Connected listener from {pipeName}@{server}");
        }
Exemplo n.º 2
0
        public static void InitializeConnection()
        {
            if (isInitialized)
            {
                return;
            }
            servicePipe   = NamedPipeStream.Open("RuntimeUnityEditor_Service", NamedPipeStream.PipeDirection.InOut);
            serviceSender = new StreamServiceSender <IRuntimeUnityEditorService>(servicePipe);
            Service       = serviceSender.Service;
            isInitialized = true;

            //if (serviceSender != null)
            //    return "";

            //try
            //{

            //    return "";
            //}
            //catch (Exception e)
            //{
            //    return e.Message;
            //}
        }
 public void Initialize()
 {
     servicePipe         = NamedPipeStream.Open(SERVICE_NAME, NamedPipeStream.PipeDirection.InOut);
     kinectServiceSender = new StreamServiceSender <IKinectService>(servicePipe);
     KinectService       = kinectServiceSender.Service;
 }