This commit is contained in:
2023-02-03 17:48:16 +09:00
parent e491ec5369
commit e983d0223d
7 changed files with 108 additions and 0 deletions

20
Socket/Server/Program.cs Normal file
View 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})");
}
}

View File

@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>