Closed
Description
Today we have all of the pieces in place the server transport but we haven't exposed anything to do client sockets. There's an internal version of the API we want here so we can start with that as the initial API:
public class SocketConnectionFactory : IConnectionFactory, IAsyncDisposable
{
public SocketConnectionFactory(IOptions<SocketTransportOptions> options, ILoggerFactory loggerFactory);
public async ValueTask<ConnectionContext> ConnectAsync(EndPoint endpoint, CancellationToken cancellationToken = default);
}
PS: This will fully enable
Some observations/questions:
- The
SocketConnectionFactory
isIAsyncDisposable
because it owns the memory pool. Do we want all connections made by the same factory sharing the pool? If yes then this type should maybe track outstanding connections before disposing the factory. - As part of these refactorings, we should have a way to construct these types without passing
Options.Create(OptionsType)
. - Are there any client options that are different from server options? This spike had a shared options base class, and also had client and server options.