Skip to content

Kestrel API clean up based on review #11257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ public partial class ListenOptions : Microsoft.AspNetCore.Connections.IConnectio
internal ListenOptions() { }
public System.IServiceProvider ApplicationServices { get { throw null; } }
public System.Collections.Generic.List<Microsoft.AspNetCore.Server.Kestrel.Core.Adapter.Internal.IConnectionAdapter> ConnectionAdapters { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
public System.Net.EndPoint EndPoint { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
public ulong FileHandle { get { throw null; } }
public System.Net.IPEndPoint IPEndPoint { get { throw null; } }
public Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions KestrelServerOptions { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
Expand Down
2 changes: 1 addition & 1 deletion src/Servers/Kestrel/Core/src/ListenOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ internal ListenOptions(ulong fileHandle, FileHandleType handleType)
EndPoint = new FileHandleEndPoint(fileHandle, handleType);
}

public EndPoint EndPoint { get; internal set; }
internal EndPoint EndPoint { get; set; }

// IPEndPoint is mutable so port 0 can be updated to the bound port.
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,71 +25,3 @@ public SocketTransportOptions() { }
public bool NoDelay { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
}
}
namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal
{
public static partial class BufferExtensions
{
public static System.ArraySegment<byte> GetArray(this System.Memory<byte> memory) { throw null; }
public static System.ArraySegment<byte> GetArray(this System.ReadOnlyMemory<byte> memory) { throw null; }
}
public partial class IOQueue : System.IO.Pipelines.PipeScheduler, System.Threading.IThreadPoolWorkItem
{
public IOQueue() { }
public override void Schedule(System.Action<object> action, object state) { }
void System.Threading.IThreadPoolWorkItem.Execute() { }
}
public partial interface ISocketsTrace : Microsoft.Extensions.Logging.ILogger
{
void ConnectionError(string connectionId, System.Exception ex);
void ConnectionPause(string connectionId);
void ConnectionReadFin(string connectionId);
void ConnectionReset(string connectionId);
void ConnectionResume(string connectionId);
void ConnectionWriteFin(string connectionId, string reason);
}
public partial class SocketAwaitableEventArgs : System.Net.Sockets.SocketAsyncEventArgs, System.Runtime.CompilerServices.ICriticalNotifyCompletion, System.Runtime.CompilerServices.INotifyCompletion
{
public SocketAwaitableEventArgs(System.IO.Pipelines.PipeScheduler ioScheduler) { }
public bool IsCompleted { get { throw null; } }
public void Complete() { }
public Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketAwaitableEventArgs GetAwaiter() { throw null; }
public int GetResult() { throw null; }
public void OnCompleted(System.Action continuation) { }
protected override void OnCompleted(System.Net.Sockets.SocketAsyncEventArgs _) { }
public void UnsafeOnCompleted(System.Action continuation) { }
}
public sealed partial class SocketReceiver : Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketSenderReceiverBase
{
public SocketReceiver(System.Net.Sockets.Socket socket, System.IO.Pipelines.PipeScheduler scheduler) : base (default(System.Net.Sockets.Socket), default(System.IO.Pipelines.PipeScheduler)) { }
public Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketAwaitableEventArgs ReceiveAsync(System.Memory<byte> buffer) { throw null; }
public Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketAwaitableEventArgs WaitForDataAsync() { throw null; }
}
public sealed partial class SocketSender : Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketSenderReceiverBase
{
public SocketSender(System.Net.Sockets.Socket socket, System.IO.Pipelines.PipeScheduler scheduler) : base (default(System.Net.Sockets.Socket), default(System.IO.Pipelines.PipeScheduler)) { }
public Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketAwaitableEventArgs SendAsync(System.Buffers.ReadOnlySequence<byte> buffers) { throw null; }
}
public abstract partial class SocketSenderReceiverBase : System.IDisposable
{
protected readonly Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketAwaitableEventArgs _awaitableEventArgs;
protected readonly System.Net.Sockets.Socket _socket;
protected SocketSenderReceiverBase(System.Net.Sockets.Socket socket, System.IO.Pipelines.PipeScheduler scheduler) { }
public void Dispose() { }
}
public partial class SocketsTrace : Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.ISocketsTrace, Microsoft.Extensions.Logging.ILogger
{
public SocketsTrace(Microsoft.Extensions.Logging.ILogger logger) { }
public System.IDisposable BeginScope<TState>(TState state) { throw null; }
public void ConnectionError(string connectionId, System.Exception ex) { }
public void ConnectionPause(string connectionId) { }
public void ConnectionRead(string connectionId, int count) { }
public void ConnectionReadFin(string connectionId) { }
public void ConnectionReset(string connectionId) { }
public void ConnectionResume(string connectionId) { }
public void ConnectionWrite(string connectionId, int count) { }
public void ConnectionWriteCallback(string connectionId, int status) { }
public void ConnectionWriteFin(string connectionId, string reason) { }
public bool IsEnabled(Microsoft.Extensions.Logging.LogLevel logLevel) { throw null; }
public void Log<TState>(Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, TState state, System.Exception exception, System.Func<TState, System.Exception, string> formatter) { }
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;
using System.Runtime.InteropServices;

namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal
{
public static class BufferExtensions
internal static class BufferExtensions
{
public static ArraySegment<byte> GetArray(this Memory<byte> memory)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal
{
public class IOQueue : PipeScheduler, IThreadPoolWorkItem
internal class IOQueue : PipeScheduler, IThreadPoolWorkItem
{
private readonly ConcurrentQueue<Work> _workItems = new ConcurrentQueue<Work>();
private int _doingWork;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;
using Microsoft.Extensions.Logging;

namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal
{
public interface ISocketsTrace : ILogger
internal interface ISocketsTrace : ILogger
{
void ConnectionReadFin(string connectionId);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;
Expand All @@ -11,7 +11,7 @@

namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal
{
public class SocketAwaitableEventArgs : SocketAsyncEventArgs, ICriticalNotifyCompletion
internal class SocketAwaitableEventArgs : SocketAsyncEventArgs, ICriticalNotifyCompletion
{
private static readonly Action _callbackCompleted = () => { };

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal
{
public sealed class SocketReceiver : SocketSenderReceiverBase
internal sealed class SocketReceiver : SocketSenderReceiverBase
{
public SocketReceiver(Socket socket, PipeScheduler scheduler) : base(socket, scheduler)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal
{
public sealed class SocketSender : SocketSenderReceiverBase
internal sealed class SocketSender : SocketSenderReceiverBase
{
private List<ArraySegment<byte>> _bufferList;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;
Expand All @@ -7,7 +7,7 @@

namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal
{
public abstract class SocketSenderReceiverBase : IDisposable
internal abstract class SocketSenderReceiverBase : IDisposable
{
protected readonly Socket _socket;
protected readonly SocketAwaitableEventArgs _awaitableEventArgs;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal
{
public class SocketsTrace : ISocketsTrace
internal class SocketsTrace : ISocketsTrace
{
// ConnectionRead: Reserved: 3

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<Compile Include="$(KestrelSharedSourceRoot)test\TestApplicationErrorLogger.cs" />
<Compile Include="$(KestrelSharedSourceRoot)test\TestHttp1Connection.cs" />
<Compile Include="$(KestrelSharedSourceRoot)test\TestKestrelTrace.cs" />
<Compile Include="..\..\Transport.Sockets\src\Internal\IOQueue.cs" Link="Internal\IOQueue.cs" />
<Compile Include="$(KestrelSharedSourceRoot)\TransportConnection.cs" Link="Internal\TransportConnection.cs" />
<Compile Include="$(KestrelSharedSourceRoot)\TransportConnection.Generated.cs" Link="Internal\TransportConnection.Generated.cs" />
<Compile Include="$(KestrelSharedSourceRoot)\TransportConnection.FeatureCollection.cs" Link="Internal\TransportConnection.FeatureCollection.cs" />
Expand Down