mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-02-26 13:31:17 +03:00
Renamed var ConnectionInfo from data to info
This commit is contained in:
parent
49b55c74b8
commit
13feee328d
@ -26,20 +26,20 @@ namespace Steamworks
|
||||
|
||||
public override string ToString() => Connection.ToString();
|
||||
|
||||
public virtual void OnConnectionChanged( ConnectionInfo data )
|
||||
public virtual void OnConnectionChanged( ConnectionInfo info )
|
||||
{
|
||||
switch ( data.State )
|
||||
switch ( info.State )
|
||||
{
|
||||
case ConnectionState.Connecting:
|
||||
OnConnecting( data );
|
||||
OnConnecting( info );
|
||||
break;
|
||||
case ConnectionState.Connected:
|
||||
OnConnected( data );
|
||||
OnConnected( info );
|
||||
break;
|
||||
case ConnectionState.ClosedByPeer:
|
||||
case ConnectionState.ProblemDetectedLocally:
|
||||
case ConnectionState.None:
|
||||
OnDisconnected( data );
|
||||
OnDisconnected( info );
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -47,7 +47,7 @@ namespace Steamworks
|
||||
/// <summary>
|
||||
/// We're trying to connect!
|
||||
/// </summary>
|
||||
public virtual void OnConnecting( ConnectionInfo data )
|
||||
public virtual void OnConnecting( ConnectionInfo info )
|
||||
{
|
||||
Connecting = true;
|
||||
}
|
||||
@ -55,7 +55,7 @@ namespace Steamworks
|
||||
/// <summary>
|
||||
/// Client is connected. They move from connecting to Connections
|
||||
/// </summary>
|
||||
public virtual void OnConnected( ConnectionInfo data )
|
||||
public virtual void OnConnected( ConnectionInfo info )
|
||||
{
|
||||
Connected = true;
|
||||
Connecting = false;
|
||||
@ -64,7 +64,7 @@ namespace Steamworks
|
||||
/// <summary>
|
||||
/// The connection has been closed remotely or disconnected locally. Check data.State for details.
|
||||
/// </summary>
|
||||
public virtual void OnDisconnected( ConnectionInfo data )
|
||||
public virtual void OnDisconnected( ConnectionInfo info )
|
||||
{
|
||||
Connected = false;
|
||||
Connecting = false;
|
||||
|
@ -40,20 +40,20 @@ namespace Steamworks
|
||||
return true;
|
||||
}
|
||||
|
||||
public virtual void OnConnectionChanged( Connection connection, ConnectionInfo data )
|
||||
public virtual void OnConnectionChanged( Connection connection, ConnectionInfo info )
|
||||
{
|
||||
switch ( data.State )
|
||||
switch ( info.State )
|
||||
{
|
||||
case ConnectionState.Connecting:
|
||||
if ( !Connecting.Contains( connection ) )
|
||||
{
|
||||
OnConnecting( connection, data );
|
||||
OnConnecting( connection, info );
|
||||
}
|
||||
break;
|
||||
case ConnectionState.Connected:
|
||||
if ( !Connected.Contains( connection ) )
|
||||
{
|
||||
OnConnected( connection, data );
|
||||
OnConnected( connection, info );
|
||||
}
|
||||
break;
|
||||
case ConnectionState.ClosedByPeer:
|
||||
@ -61,7 +61,7 @@ namespace Steamworks
|
||||
case ConnectionState.None:
|
||||
if ( Connecting.Contains( connection ) || Connected.Contains( connection ) )
|
||||
{
|
||||
OnDisconnected( connection, data );
|
||||
OnDisconnected( connection, info );
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -70,7 +70,7 @@ namespace Steamworks
|
||||
/// <summary>
|
||||
/// Default behaviour is to accept every connection
|
||||
/// </summary>
|
||||
public virtual void OnConnecting( Connection connection, ConnectionInfo data )
|
||||
public virtual void OnConnecting( Connection connection, ConnectionInfo info )
|
||||
{
|
||||
connection.Accept();
|
||||
Connecting.Add( connection );
|
||||
@ -79,7 +79,7 @@ namespace Steamworks
|
||||
/// <summary>
|
||||
/// Client is connected. They move from connecting to Connections
|
||||
/// </summary>
|
||||
public virtual void OnConnected( Connection connection, ConnectionInfo data )
|
||||
public virtual void OnConnected( Connection connection, ConnectionInfo info )
|
||||
{
|
||||
Connecting.Remove( connection );
|
||||
Connected.Add( connection );
|
||||
@ -89,7 +89,7 @@ namespace Steamworks
|
||||
/// <summary>
|
||||
/// The connection has been closed remotely or disconnected locally. Check data.State for details.
|
||||
/// </summary>
|
||||
public virtual void OnDisconnected( Connection connection, ConnectionInfo data )
|
||||
public virtual void OnDisconnected( Connection connection, ConnectionInfo info )
|
||||
{
|
||||
SteamNetworkingSockets.Internal.SetConnectionPollGroup( connection, 0 );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user