Hello i would like to ask what is difference between using this :
public TcpListener Listener;
public TcpClient Client;
Listener = new TcpListener(DeafultPort);
Client = default(TcpClient);
Listener.Start();
and this :
serverSocket = new Socket(AddressFamily.InterNetwork,
SocketType.Stream,
ProtocolType.Tcp);
IPEndPoint ipEndPoint = new IPEndPoint(IPAddress.Any, 1000);
and also i would like to know if i use first option what is difference between
Listener.BeginAcceptSocket()
and
Listener.Server.BeginAccept()
and if i use second option what exactly does these two lines ?
serverSocket.Bind(ipEndPoint);
serverSocket.Listen(4);
Thanks for answers