Skip to content

Commit

Permalink
Const (#818)
Browse files Browse the repository at this point in the history
  • Loading branch information
shargon authored Jun 12, 2019
1 parent 1a2ac5a commit 50c16bd
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions neo/Network/P2P/Connection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@ public abstract class Connection : UntypedActor
internal class Timer { public static Timer Instance = new Timer(); }
internal class Ack : Tcp.Event { public static Ack Instance = new Ack(); }

public IPEndPoint Remote { get; }
public IPEndPoint Local { get; }

private ICancelable timer;
private readonly IActorRef tcp;
private readonly WebSocket ws;
private bool disconnected = false;
/// <summary>
/// connection initial timeout (in seconds) before any package has been accepted
/// </summary>
private double connectionTimeoutLimitStart = 10;
private const int connectionTimeoutLimitStart = 10;
/// <summary>
/// connection timeout (in seconds) after every `OnReceived(ByteString data)` event
/// </summary>
private double connectionTimeoutLimit = 60;
private const int connectionTimeoutLimit = 60;

public IPEndPoint Remote { get; }
public IPEndPoint Local { get; }

private ICancelable timer;
private readonly IActorRef tcp;
private readonly WebSocket ws;
private bool disconnected = false;
protected Connection(object connection, IPEndPoint remote, IPEndPoint local)
{
this.Remote = remote;
Expand Down

0 comments on commit 50c16bd

Please sign in to comment.