コード例 #1
0
 public static void ConnectPipeToClient(int pipe_id, int client_id)
 {
     ClientPipe.CallSerializedFunction(pipe_id, new SerializedFunction
     {
         ClientId    = client_id,
         InterfaceId = -1,
         Name        = "ConnectPipeToClient",
         Args        = new object[] { },
     });
 }
コード例 #2
0
        public static int CreatePipe()
        {
            // In order to ensure that pipe indexes start at 1
            if (ActivePipes.Count == 0)
            {
                ActivePipes.Add(null);
            }

            var c = new ClientPipe();

            return(c.Id);
        }
コード例 #3
0
        /// <summary>
        /// Get the next callback for this client from the server
        /// </summary>
        /// <returns>The next callback</returns>
        public static InternalCallbackMsg NextCallback(int pipe_id)
        {
            var f = new SerializedFunction
            {
                ClientId    = -1,
                InterfaceId = -1,
                Name        = "NextCallback",
                Args        = new object[] { },
            };

            return((InternalCallbackMsg)ClientPipe.CallSerializedFunction(pipe_id, f).Result);
        }
コード例 #4
0
        /// <summary>
        /// Aks the server to create its instance for this interface
        /// </summary>
        /// <param name="name"></param>
        /// <returns>The interface id created</returns>
        public static int CreateInterface(int pipe_id, int client_id, string name)
        {
            var f = new SerializedFunction
            {
                ClientId    = client_id,
                InterfaceId = -1,
                Name        = "CreateInterface",
                Args        = new object[] { name },
            };

            return((int)ClientPipe.CallSerializedFunction(pipe_id, f).Result);
        }
コード例 #5
0
        public static void ReleaseClient(int pipe_id, int client_id)
        {
            var f = new SerializedFunction
            {
                ClientId    = client_id,
                InterfaceId = -1,
                Name        = "Release",
                Args        = new object[] { }
            };

            ClientPipe.CallSerializedFunction(pipe_id, f);
        }
コード例 #6
0
        public static void SetAppId(int pipe_id, int app_id)
        {
            var f = new SerializedFunction
            {
                ClientId    = -1,
                InterfaceId = -1,
                Name        = "SetAppId",
                Args        = new object[] { app_id },
            };

            ClientPipe.CallSerializedFunction(pipe_id, f);
        }
コード例 #7
0
        public static int CreateClient(int pipe_id)
        {
            var f = new SerializedFunction
            {
                ClientId    = -1,
                InterfaceId = -1,
                Name        = "CreateClient",
                Args        = new object[] { },
            };

            return((int)ClientPipe.CallSerializedFunction(pipe_id, f).Result);
        }