mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-13 07:08:05 +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 List<Connection> Connecting = new List<Connection>();
|
||||
public List<Connection> Connected = new List<Connection>();
|
||||
public Socket Socket { get; internal set; }
|
||||
|
||||
public override string ToString() => Socket.ToString();
|
||||
@ -49,31 +47,14 @@ namespace Steamworks
|
||||
case ConnectionState.None:
|
||||
break;
|
||||
case ConnectionState.Connecting:
|
||||
if ( !Connecting.Contains( connection ) )
|
||||
{
|
||||
Connecting.Add( connection );
|
||||
|
||||
OnConnecting( connection, info );
|
||||
}
|
||||
OnConnecting( connection, info );
|
||||
break;
|
||||
case ConnectionState.Connected:
|
||||
if ( !Connected.Contains( connection ) )
|
||||
{
|
||||
Connecting.Remove( connection );
|
||||
Connected.Add( connection );
|
||||
|
||||
OnConnected( connection, info );
|
||||
}
|
||||
OnConnected( connection, info );
|
||||
break;
|
||||
case ConnectionState.ClosedByPeer:
|
||||
case ConnectionState.ProblemDetectedLocally:
|
||||
if ( Connecting.Contains( connection ) || Connected.Contains( connection ) )
|
||||
{
|
||||
Connecting.Remove( connection );
|
||||
Connected.Remove( connection );
|
||||
|
||||
OnDisconnected( connection, info );
|
||||
}
|
||||
OnDisconnected( connection, info );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user