add clientconsole (ceated by Bruno)
continuous-integration/drone/push Build is failing Details

Server
Hugo LIVET 2 years ago
parent 18cad2aac0
commit 4c7ff23ca9

@ -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>

@ -0,0 +1,29 @@
using System;
using System.Net;
using System.Net.Sockets;
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Welcome to Pong Multiplayer - Client");
StartClient();
}
static void StartClient()
{
//IPEndPoint endPoint = new IPEndPoint(IPAddress.Parse("82.165.19.245"), 3131);
IPEndPoint endPoint = new IPEndPoint(Dns.GetHostAddresses("leaphit.hulivet.fr").FirstOrDefault(), 3131);
UdpClient client = new UdpClient();
Console.WriteLine("Client connected to server: " + endPoint.ToString());
while (true)
{
Console.WriteLine("Enter data to send to server:");
string data = Console.ReadLine();
byte[] dataToSend = System.Text.Encoding.ASCII.GetBytes(data);
client.Send(dataToSend, dataToSend.Length, endPoint);
}
}
}

@ -11,10 +11,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DTO", "DTO\DTO.csproj", "{B
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DataBase", "DataBase\DataBase.csproj", "{FCCE7DEC-1F7B-4C66-8C61-3FCB668F9008}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestControleurs", "TestControleurs\TestControleurs.csproj", "{A9DFF203-7F27-44BA-A460-F65C01D0EDFD}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestControleurs", "TestControleurs\TestControleurs.csproj", "{A9DFF203-7F27-44BA-A460-F65C01D0EDFD}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{12A97D16-34BB-4D4F-9F76-D74061A9BA77}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ClientConsole", "ClientConsole\ClientConsole.csproj", "{33F7C629-F92B-459C-BCC5-6A4601D6D9EA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -41,6 +43,10 @@ Global
{A9DFF203-7F27-44BA-A460-F65C01D0EDFD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A9DFF203-7F27-44BA-A460-F65C01D0EDFD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A9DFF203-7F27-44BA-A460-F65C01D0EDFD}.Release|Any CPU.Build.0 = Release|Any CPU
{33F7C629-F92B-459C-BCC5-6A4601D6D9EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{33F7C629-F92B-459C-BCC5-6A4601D6D9EA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{33F7C629-F92B-459C-BCC5-6A4601D6D9EA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{33F7C629-F92B-459C-BCC5-6A4601D6D9EA}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

Loading…
Cancel
Save