mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-26 05:28:07 +03:00
TestSocketInterface fix
This commit is contained in:
parent
5fd6de76d7
commit
ea1408392b
@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Steamworks.Data;
|
||||
@ -13,6 +14,8 @@ namespace Steamworks
|
||||
{
|
||||
public bool HasFinished = false;
|
||||
|
||||
public List<Connection> Connected = new List<Connection>();
|
||||
|
||||
public override void OnConnectionChanged( Connection connection, ConnectionInfo data )
|
||||
{
|
||||
Console.WriteLine( $"[Socket{Socket}][connection:{connection}][data.Identity:{data.Identity}] [data.State:{data.State}]" );
|
||||
@ -31,6 +34,8 @@ namespace Steamworks
|
||||
/// </summary>
|
||||
public override void OnConnected( Connection connection, ConnectionInfo data )
|
||||
{
|
||||
Connected.Add( connection );
|
||||
|
||||
Console.WriteLine( $"" );
|
||||
Console.WriteLine( $"Socket -> OnConnected:" );
|
||||
Console.WriteLine( $" data.Address: {data.Address}" );
|
||||
@ -52,7 +57,10 @@ namespace Steamworks
|
||||
/// </summary>
|
||||
public override void OnDisconnected( Connection connection, ConnectionInfo data )
|
||||
{
|
||||
Connected.Remove( connection );
|
||||
|
||||
Console.WriteLine( $" - OnDisconnected" );
|
||||
|
||||
base.OnDisconnected( connection, data );
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user