Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="EpicsTCPGWConnection"/> class.
        /// </summary>
        /// <param name="TCPSocket">
        /// The tcp socket.
        /// </param>
        /// <param name="gw">
        /// The gw.
        /// </param>
        internal EpicsTCPGWConnection(Socket TCPSocket, EpicsGateWay gw)
            : base(TCPSocket)
        {
            this.GateWay          = gw;
            this.codec            = this.GateWay.ReceiverCodec;
            this.clientConnection = true;
            this.GateWay.Statistic.ClientConnected++;

            this.remoteKey = TCPSocket.RemoteEndPoint.ToString();

            TCPSocket.ReceiveBufferSize = this.GateWay.Config.TCPBufferSize;
            TCPSocket.SendBufferSize    = this.GateWay.Config.TCPBufferSize;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="EpicsUDPGWConnection"/> class.
        /// </summary>
        /// <param name="gateWay">
        /// The gate way.
        /// </param>
        /// <param name="Codec">
        /// The codec.
        /// </param>
        public EpicsUDPGWConnection(EpicsGateWay gateWay, EpicsCodec Codec)
        {
            this.GateWay = gateWay;

            this.UDPSocket.SendBufferSize    = this.GateWay.Config.UDPBufferSize;
            this.UDPSocket.ReceiveBufferSize = this.GateWay.Config.UDPBufferSize;

            this.wrapTargetList(this.GateWay.Config.ServerList.getStringList());

            gateWay.Config.ConfigChanged += this.Config_ConfigChanged;

            this.codec = Codec;
        }
Exemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="EpicsTCPGWConnection"/> class.
        /// </summary>
        /// <param name="ipe">
        /// The ipe.
        /// </param>
        /// <param name="gw">
        /// The gw.
        /// </param>
        internal EpicsTCPGWConnection(IPEndPoint ipe, EpicsGateWay gw)
            : base(ipe)
        {
            this.GateWay = gw;
            this.codec   = this.GateWay.ConnectorCodec;
            this.GateWay.Statistic.ServerConnected++;

            this.TCPSocket.ReceiveBufferSize = this.GateWay.Config.TCPBufferSize;
            this.TCPSocket.SendBufferSize    = this.GateWay.Config.TCPBufferSize;

            this.Send(EpicsCodec.CTCPGreet);

            this.remoteKey = ipe.ToString();
        }