SHARE
TWEET

Untitled

a guest Oct 15th, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Net;
  3. using System.Net.Sockets;
  4. using System.Text;
  5.  
  6. namespace wincfg_server
  7. {
  8.     class Program
  9.     {
  10.         static void Main(string[] args)
  11.         {
  12.             TcpListener listener = new TcpListener(IPAddress.Any, 6378);
  13.             listener.Start();
  14.  
  15.             for (int i = 0; i < 5; i++)
  16.             {
  17.                 Socket s = listener.AcceptSocket();
  18.                 ASCIIEncoding asen = new ASCIIEncoding();
  19.                 s.Send(asen.GetBytes("Test"));
  20.                 Console.WriteLine("CLOSED");
  21.                 s.Close();
  22.             }
  23.         }
  24.     }
  25. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top