public HathiServerChannelSink(IServerChannelSinkProvider Provider, IChannelReceiver channel) { IServerChannelSink nextServer = (IServerChannelSink)new BinaryServerFormatterSink( BinaryServerFormatterSink.Protocol.Other, this.NextChannelSink, channel); if (channel != null) m_channel = channel; if (Provider != null) m_Provider = Provider as HathiServerSinkProvider; m_NextIServerChannelSink = new HathiServerChannelSink(Provider, channel, nextServer); }
public HathiServerChannelSink(IServerChannelSinkProvider Provider, IChannelReceiver channel, object nextobject) { if (channel != null) m_channel = channel; if (Provider != null) m_Provider = Provider as HathiServerSinkProvider; if (nextobject != null) { m_NextIServerChannelSink = nextobject as IServerChannelSink; if (m_NextIServerChannelSink == null) m_NextIServerChannelSink = new BinaryServerFormatterSink( BinaryServerFormatterSink.Protocol.Other, this.NextChannelSink, channel); } }
public CRemoting() { // // TODO: agregar aquí la lógica del constructor // puerto = CKernel.Preferences.GetInt("RemoteControlPort",4670); IPPermitida = CKernel.Preferences.GetStringArray("AllowedIP"); Hashtable props = new Hashtable(); props.Add("name","HathiService"); props.Add("priority","10"); //en la ayuda pone que son enteros, pero con ellos da error de conversion. props.Add("port", puerto); props.Add("supressChannelData",true); props.Add("useIpAddress",true); props.Add("rejectRemoteRequests",false); #if (!COMPRESSION) BinaryServerFormatterSinkProvider provider = new BinaryServerFormatterSinkProvider(); provider.TypeFilterLevel = System.Runtime.Serialization.Formatters.TypeFilterLevel.Full; m_lPhantChannel = new TcpServerChannel(props, provider); ChannelServices.RegisterChannel(m_lPhantChannel, true); #else //Iniciacion Hashtable propsinks = new Hashtable(); propsinks.Add("includeVersions",true); propsinks.Add("typeFilterLevel","Full"); Hashtable datasinks = new Hashtable(); //2ª Opcion HathiServerSinkProvider provider = new HathiServerSinkProvider(propsinks,datasinks); //Creacion m_lPhantChannel = new TcpServerChannel(props, provider); ChannelServices.RegisterChannel(m_lPhantChannel, true); #endif RemotingConfiguration.RegisterWellKnownServiceType( typeof(CInterfaceGateway), "InterfazRemota", WellKnownObjectMode.Singleton); }