mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-05-31 15:57:44 +03:00
Removed SocketManager.Connecting and SocketManager.Connected lists (can be tracked in ISocketManager if needed)
This commit is contained in:
parent
943c4f9a30
commit
401f53b30d
@ -16,8 +16,6 @@ namespace Steamworks
|
|||||||
{
|
{
|
||||||
public ISocketManager Interface { get; set; }
|
public ISocketManager Interface { get; set; }
|
||||||
|
|
||||||
public List<Connection> Connecting = new List<Connection>();
|
|
||||||
public List<Connection> Connected = new List<Connection>();
|
|
||||||
public Socket Socket { get; internal set; }
|
public Socket Socket { get; internal set; }
|
||||||
|
|
||||||
public override string ToString() => Socket.ToString();
|
public override string ToString() => Socket.ToString();
|
||||||
@ -49,31 +47,14 @@ namespace Steamworks
|
|||||||
case ConnectionState.None:
|
case ConnectionState.None:
|
||||||
break;
|
break;
|
||||||
case ConnectionState.Connecting:
|
case ConnectionState.Connecting:
|
||||||
if ( !Connecting.Contains( connection ) )
|
OnConnecting( connection, info );
|
||||||
{
|
|
||||||
Connecting.Add( connection );
|
|
||||||
|
|
||||||
OnConnecting( connection, info );
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case ConnectionState.Connected:
|
case ConnectionState.Connected:
|
||||||
if ( !Connected.Contains( connection ) )
|
OnConnected( connection, info );
|
||||||
{
|
|
||||||
Connecting.Remove( connection );
|
|
||||||
Connected.Add( connection );
|
|
||||||
|
|
||||||
OnConnected( connection, info );
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case ConnectionState.ClosedByPeer:
|
case ConnectionState.ClosedByPeer:
|
||||||
case ConnectionState.ProblemDetectedLocally:
|
case ConnectionState.ProblemDetectedLocally:
|
||||||
if ( Connecting.Contains( connection ) || Connected.Contains( connection ) )
|
OnDisconnected( connection, info );
|
||||||
{
|
|
||||||
Connecting.Remove( connection );
|
|
||||||
Connected.Remove( connection );
|
|
||||||
|
|
||||||
OnDisconnected( connection, info );
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user