Пример #1
0
        public eLePhantServerChannelSink(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 eLePhantServerSinkProvider;
            }
            m_NextIServerChannelSink = new eLePhantServerChannelSink(Provider, channel, nextServer);
        }
Пример #2
0
        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", "eLePhantService");
            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);
#else
            //Iniciacion
            Hashtable propsinks = new Hashtable();
            propsinks.Add("includeVersions", true);
            propsinks.Add("typeFilterLevel", "Full");
            Hashtable datasinks = new Hashtable();

            //2ª Opcion
            eLePhantServerSinkProvider provider =
                new eLePhantServerSinkProvider(propsinks, datasinks);

            //Creacion
            m_lPhantChannel = new TcpServerChannel(props, provider);
            ChannelServices.RegisterChannel(m_lPhantChannel);
#endif
            RemotingConfiguration.RegisterWellKnownServiceType(
                typeof(CInterfaceGateway),
                "InterfazRemota",
                WellKnownObjectMode.Singleton);
        }
Пример #3
0
 public eLePhantServerChannelSink(IServerChannelSinkProvider Provider, IChannelReceiver channel, object nextobject)
 {
     if (channel != null)
     {
         m_channel = channel;
     }
     if (Provider != null)
     {
         m_Provider = Provider as eLePhantServerSinkProvider;
     }
     if (nextobject != null)
     {
         m_NextIServerChannelSink = nextobject as IServerChannelSink;
         if (m_NextIServerChannelSink == null)
         {
             m_NextIServerChannelSink = new BinaryServerFormatterSink(
                 BinaryServerFormatterSink.Protocol.Other, this.NextChannelSink, channel);
         }
     }
 }
Пример #4
0
        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","eLePhantService");
            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);
            #else
            //Iniciacion
            Hashtable propsinks = new Hashtable();
            propsinks.Add("includeVersions",true);
            propsinks.Add("typeFilterLevel","Full");
            Hashtable datasinks = new Hashtable();

            //2ª Opcion
            eLePhantServerSinkProvider provider =
                new eLePhantServerSinkProvider(propsinks,datasinks);

            //Creacion
            m_lPhantChannel = new TcpServerChannel(props, provider);
            ChannelServices.RegisterChannel(m_lPhantChannel);

            #endif
            RemotingConfiguration.RegisterWellKnownServiceType(
                typeof(CInterfaceGateway),
                "InterfazRemota",
                WellKnownObjectMode.Singleton);
        }
Пример #5
0
        public eLePhantServerChannelSink(IServerChannelSinkProvider Provider, IChannelReceiver channel, object nextobject)
        {
            if (channel != null) m_channel=channel;
            if (Provider != null) m_Provider=Provider as eLePhantServerSinkProvider;
            if (nextobject != null)
            {
                m_NextIServerChannelSink=nextobject as IServerChannelSink;
                if (m_NextIServerChannelSink==null)
                    m_NextIServerChannelSink=new BinaryServerFormatterSink(
                        BinaryServerFormatterSink.Protocol.Other,this.NextChannelSink,channel);

            }
        }
Пример #6
0
 public eLePhantServerChannelSink(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 eLePhantServerSinkProvider;
     m_NextIServerChannelSink=new eLePhantServerChannelSink(Provider,channel,nextServer);
 }