1
0
mirror of https://github.com/oliverbooth/TcpDotNet synced 2024-11-23 01:08:47 +00:00

[ci skip] test: add additional trace logging

This commit is contained in:
Oliver Booth 2024-02-13 00:06:42 +00:00
parent 5cb8b821ca
commit 906d5870f8
Signed by: oliverbooth
GPG Key ID: E60B570D1B7557B5
2 changed files with 7 additions and 1 deletions

View File

@ -11,7 +11,10 @@ client.Disconnected += (_, e) => Console.WriteLine($"Disconnected: {e.Disconnect
client.RegisterPacketHandler(PacketHandler<PongPacket>.Empty);
client.RegisterPacketHandler(new GoodbyePacketHandler());
await client.ConnectAsync(IPAddress.IPv6Loopback, 1234);
var remoteEP = new IPEndPoint(IPAddress.Loopback, 1234);
Console.WriteLine($"Connecting to {remoteEP}");
await client.ConnectAsync(remoteEP);
Console.WriteLine($"Connected to {client.RemoteEndPoint}. My session is {client.SessionId}");

View File

@ -10,7 +10,10 @@ listener.ClientDisconnected += (_, e) => Console.WriteLine($"Client {e.Client.Se
listener.RegisterPacketHandler(new HelloPacketHandler());
listener.RegisterPacketHandler(new PingPacketHandler());
Console.WriteLine("Starting listener");
listener.Start(1234);
Console.WriteLine($"Listener started on {listener.LocalEndPoint}");
await Task.Delay(-1);