Exemplo n.º 1
0
        public FileSender(string ipAddress, int port, string fileName)
        {
            _fileName = fileName;

            _tcpClient = new TcpClient(new Socket(AddressFamily.InterNetwork,
                SocketType.Stream, ProtocolType.Tcp));

            _tcpClient.Connect(ipAddress, port);

            SendingFileToServer();

            //Console.CancelKeyPress += KeyPressHanlder;

            _tcpClient.EndConnection();
        }