private void SetupChannel() { if (this.authSet && !this._secure) { throw new RemotingException(CoreChannel.GetResourceString("Remoting_Ipc_AuthenticationConfig")); } this._channelData = new ChannelDataStore(null); this._channelData.ChannelUris = new string[] { this.GetChannelUri() }; if (this._sinkProvider == null) { this._sinkProvider = this.CreateDefaultServerProviderChain(); } CoreChannel.CollectChannelDataFromServerSinkProviders(this._channelData, this._sinkProvider); IServerChannelSink nextSink = ChannelServices.CreateServerChannelSinkChain(this._sinkProvider, this); this._transportSink = new IpcServerTransportSink(nextSink, this._secure, this._impersonate); ThreadStart start = new ThreadStart(this.Listen); this._listenerThread = new Thread(start); this._listenerThread.IsBackground = true; this.StartListening(null); }
private void SetupChannel() { // set channel data // (These get changed inside of StartListening(), in the case where the listen // port is 0, because we can't determine the port number until after the // IpcListener starts.) if (authSet && !_secure) { throw new RemotingException(CoreChannel.GetResourceString( "Remoting_Ipc_AuthenticationConfig")); } _channelData = new ChannelDataStore(null); _channelData.ChannelUris = new String[1]; _channelData.ChannelUris[0] = GetChannelUri(); // set default provider (soap formatter) if no provider has been set if (_sinkProvider == null) { _sinkProvider = CreateDefaultServerProviderChain(); } CoreChannel.CollectChannelDataFromServerSinkProviders(_channelData, _sinkProvider); // construct sink chain IServerChannelSink sink = ChannelServices.CreateServerChannelSinkChain(_sinkProvider, this); _transportSink = new IpcServerTransportSink(sink, _secure, _impersonate); // Start a thread to listen for incoming requests ThreadStart t = new ThreadStart(this.Listen); _listenerThread = new Thread(t); _listenerThread.IsBackground = true; // Wait for thread to spin up StartListening(null); } // SetupChannel
private void SetupChannel() { // set channel data // (These get changed inside of StartListening(), in the case where the listen // port is 0, because we can't determine the port number until after the // IpcListener starts.) if (authSet && !_secure) throw new RemotingException(CoreChannel.GetResourceString( "Remoting_Ipc_AuthenticationConfig")); _channelData = new ChannelDataStore(null); _channelData.ChannelUris = new String[1]; _channelData.ChannelUris[0] = GetChannelUri(); // set default provider (soap formatter) if no provider has been set if (_sinkProvider == null) _sinkProvider = CreateDefaultServerProviderChain(); CoreChannel.CollectChannelDataFromServerSinkProviders(_channelData, _sinkProvider); // construct sink chain IServerChannelSink sink = ChannelServices.CreateServerChannelSinkChain(_sinkProvider, this); _transportSink = new IpcServerTransportSink(sink, _secure, _impersonate); // Start a thread to listen for incoming requests ThreadStart t = new ThreadStart(this.Listen); _listenerThread = new Thread(t); _listenerThread.IsBackground = true; // Wait for thread to spin up StartListening(null); } // SetupChannel