Automobile.Communication.Tcp.TcpClientCommunicator.Initialize C# (CSharp) Method

Initialize() public method

Prepare the stream for reading and writing
public Initialize ( ) : void
return void
        public override void Initialize()
        {
            Server = new IPEndPoint(IP, Port);
            Client = new TcpClient();
            Client.Connect(Server);
            base.Initialize();
        }

Usage Example

 public void ConnectionTest()
 {
     var comm = new TcpClientCommunicator("127.0.0.1", 3001);
     comm.Initialize();
     Assert.IsTrue(comm.Connected);
     comm.Close();
     Assert.IsFalse(comm.Connected);
 }
All Usage Examples Of Automobile.Communication.Tcp.TcpClientCommunicator::Initialize