Skip to content

Commit

Permalink
Readonly Socket !
Browse files Browse the repository at this point in the history
  • Loading branch information
ShreyasJejurkar committed Mar 11, 2021
1 parent c232fd1 commit 8e73961
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ public abstract class BaseConnectionContext : IAsyncDisposable
public virtual EndPoint? RemoteEndPoint { get; set; }

/// <summary>
/// Gets or sets the socket for this connection.
/// Gets the socket for this connection.
/// </summary>
public virtual Socket? Socket { get; set; }
public virtual Socket? Socket { get; }

/// <summary>
/// Aborts the underlying connection.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public DefaultConnectionContext(string id, IDuplexPipe transport, IDuplexPipe ap
public override EndPoint? RemoteEndPoint { get; set; }

/// <inheritdoc />
public override Socket? Socket { get; set; }
public override Socket? Socket { get; }

/// <inheritdoc />
public override void Abort(ConnectionAbortedException abortReason)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,4 @@ Microsoft.AspNetCore.Connections.Experimental.MultiplexedConnectionDelegate
abstract Microsoft.AspNetCore.Connections.Experimental.MultiplexedConnectionContext.AcceptAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Connections.ConnectionContext?>
abstract Microsoft.AspNetCore.Connections.Experimental.MultiplexedConnectionContext.ConnectAsync(Microsoft.AspNetCore.Http.Features.IFeatureCollection? features = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Connections.ConnectionContext!>
override Microsoft.AspNetCore.Connections.DefaultConnectionContext.Socket.get -> System.Net.Sockets.Socket?
override Microsoft.AspNetCore.Connections.DefaultConnectionContext.Socket.set -> void
virtual Microsoft.AspNetCore.Connections.BaseConnectionContext.Socket.get -> System.Net.Sockets.Socket?
virtual Microsoft.AspNetCore.Connections.BaseConnectionContext.Socket.set -> void
2 changes: 1 addition & 1 deletion src/Servers/Kestrel/shared/TransportConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public override string ConnectionId
}
}

public override Socket? Socket { get; set; }
public override Socket? Socket { get; }

public override CancellationToken ConnectionClosed { get; set; }

Expand Down

0 comments on commit 8e73961

Please sign in to comment.