Socket
This commit is contained in:
20
Socket/Server/Program.cs
Normal file
20
Socket/Server/Program.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
|
||||
namespace Server;
|
||||
|
||||
internal class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Socket serverSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
|
||||
IPEndPoint endPoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 20000);
|
||||
serverSocket.Bind(endPoint);
|
||||
|
||||
serverSocket.Listen(20);
|
||||
|
||||
//Socket clientSocket = serverSocket.Accept();
|
||||
|
||||
//Console.WriteLine($"Connected. ({clientSocket.RemoteEndPoint})");
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user