Exemplo n.º 1
0
        //**********************************************************************
        //**********************************************************************
        //**********************************************************************
        // Configure the socket.

        public void configure(BaseMsgMonkeyCreator aMonkeyCreator, String aAddress, int aPort)
        {
            mMonkey     = aMonkeyCreator.createNew();
            mUdpClient  = new UdpClient(aPort);
            mIPEndPoint = new IPEndPoint(IPAddress.Parse(aAddress), aPort);

            Prn.print(Prn.SocketInit2, "UdpRxMsgSocket     $ {0,16} : {1}", mIPEndPoint.Address.ToString(), mIPEndPoint.Port);
        }
Exemplo n.º 2
0
        //**********************************************************************
        //**********************************************************************
        //**********************************************************************
        // Configure the socket.

        public void configure(BaseMsgMonkeyCreator aMonkeyCreator, String aAddress, int aPort)
        {
            mMonkey     = aMonkeyCreator.createNew();
            mSocket     = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
            mIPEndPoint = new IPEndPoint(IPAddress.Parse(aAddress), aPort);

            Prn.print(Prn.SocketInit2, "UdpTxMsgSocket     $ {0,16} : {1}", mIPEndPoint.Address.ToString(), mIPEndPoint.Port);
        }
Exemplo n.º 3
0
        public void configure(
            BaseMsgMonkeyCreator aMonkeyCreator,
            String aRxAddress,
            int aRxPort,
            String aTxAddress,
            int aTxPort)
        {
            // Rx socket
            mRxSocket = new UdpRxMsgSocket();
            mRxSocket.configure(aMonkeyCreator, aRxAddress, aRxPort);

            // Tx socket
            mTxSocket = new UdpTxMsgSocket();
            mTxSocket.configure(aMonkeyCreator, aTxAddress, aTxPort);
        }