Guest User

Untitled

a guest
May 21st, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.73 KB | None | 0 0
  1. using System;
  2. using System.Threading;
  3. using System.Net.Sockets;
  4. using System.Text;
  5. using System.Collections;
  6.  
  7. namespace Tilted_Client
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             TcpClient _client = new TcpClient();
  14.             byte[] _buffer = new byte[4096];
  15.             string _in;
  16.  
  17.             _client.Connect("127.0.0.1", 3000);
  18.             NetworkStream _netStream = _client.GetStream();
  19.  
  20.             while (true)
  21.             {
  22.                 _in = Console.ReadLine();
  23.                 _buffer = System.Text.Encoding.ASCII.GetBytes(_in);
  24.                 _netStream.Write(_buffer, 0, _buffer.Length);
  25.                 _netStream.Flush();
  26.             }
  27.         }
  28.     }
  29. }
Add Comment
Please, Sign In to add comment