Skip to content

Commit 8e73961

Browse files
Readonly Socket !
1 parent c232fd1 commit 8e73961

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

src/Servers/Connections.Abstractions/src/BaseConnectionContext.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ public abstract class BaseConnectionContext : IAsyncDisposable
4747
public virtual EndPoint? RemoteEndPoint { get; set; }
4848

4949
/// <summary>
50-
/// Gets or sets the socket for this connection.
50+
/// Gets the socket for this connection.
5151
/// </summary>
52-
public virtual Socket? Socket { get; set; }
52+
public virtual Socket? Socket { get; }
5353

5454
/// <summary>
5555
/// Aborts the underlying connection.

src/Servers/Connections.Abstractions/src/DefaultConnectionContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public DefaultConnectionContext(string id, IDuplexPipe transport, IDuplexPipe ap
100100
public override EndPoint? RemoteEndPoint { get; set; }
101101

102102
/// <inheritdoc />
103-
public override Socket? Socket { get; set; }
103+
public override Socket? Socket { get; }
104104

105105
/// <inheritdoc />
106106
public override void Abort(ConnectionAbortedException abortReason)

src/Servers/Connections.Abstractions/src/PublicAPI.Unshipped.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,4 @@ Microsoft.AspNetCore.Connections.Experimental.MultiplexedConnectionDelegate
2626
abstract Microsoft.AspNetCore.Connections.Experimental.MultiplexedConnectionContext.AcceptAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Connections.ConnectionContext?>
2727
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!>
2828
override Microsoft.AspNetCore.Connections.DefaultConnectionContext.Socket.get -> System.Net.Sockets.Socket?
29-
override Microsoft.AspNetCore.Connections.DefaultConnectionContext.Socket.set -> void
3029
virtual Microsoft.AspNetCore.Connections.BaseConnectionContext.Socket.get -> System.Net.Sockets.Socket?
31-
virtual Microsoft.AspNetCore.Connections.BaseConnectionContext.Socket.set -> void

src/Servers/Kestrel/shared/TransportConnection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public override string ConnectionId
6565
}
6666
}
6767

68-
public override Socket? Socket { get; set; }
68+
public override Socket? Socket { get; }
6969

7070
public override CancellationToken ConnectionClosed { get; set; }
7171

0 commit comments

Comments
 (0)