Beispiel #1
0
        public eAntServerChannelSink(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 eAntServerSinkProvider;
            }
            m_NextIServerChannelSink = new eAntServerChannelSink(Provider, channel, nextServer);
        }
Beispiel #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", "eAntService");
            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_AntChannel = new TcpServerChannel(props, provider);
            ChannelServices.RegisterChannel(m_AntChannel);
#else
            //Iniciacion
            Hashtable propsinks = new Hashtable();
            propsinks.Add("includeVersions", true);
            propsinks.Add("typeFilterLevel", "Full");
            Hashtable datasinks = new Hashtable();

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

            //Creacion
            m_AntChannel = new TcpServerChannel(props, provider);
            ChannelServices.RegisterChannel(m_AntChannel);
#endif
            RemotingConfiguration.RegisterWellKnownServiceType(
                typeof(CInterfaceGateway),
                "InterfazRemota",
                WellKnownObjectMode.Singleton);
        }
Beispiel #3
0
 public eAntServerChannelSink(IServerChannelSinkProvider Provider, IChannelReceiver channel, object nextobject)
 {
     if (channel != null)
     {
         m_channel = channel;
     }
     if (Provider != null)
     {
         m_Provider = Provider as eAntServerSinkProvider;
     }
     if (nextobject != null)
     {
         m_NextIServerChannelSink = nextobject as IServerChannelSink;
         if (m_NextIServerChannelSink == null)
         {
             m_NextIServerChannelSink = new BinaryServerFormatterSink(
                 BinaryServerFormatterSink.Protocol.Other, this.NextChannelSink, channel);
         }
     }
 }