-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Allow customizing Socket.AcceptAsync() call #34344
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
Comments
Do you mind elaborating on your use case? I'm curious on what you plan to use this for? |
@shirhatti Currently we've got a single process which is accepting requests for multiple domains. Because of some other constraints beyond our control, we have to keep that one process accepting everything but would like to move the connections to separate processes based on the domain the connection is for. We may also chose to serve some portion of the requests in the existing process. We basically want to be able to swap the
In essence we'd be changing where the |
We reverted this delay change. The new strategy is to make the SocketConnectionFactory available and that is what would be used along with a custom transport on both the incoming side and receiving side. |
We have an application where it would useful to be able to inspect a
Socket
after it is accepted, but before any other operations happen on it, in order to determine whether we want to marshal it over to another process to handle.Currently this is not possible because once accepted in
SocketConnectionListener
, aSocket
is almost immediately wrapped up in aConnectionContext
and read from.It is important for us to inspect a
Socket
immediately, as (on Windows) once asynchronous I/O beings moving aSocket
to another process will fail (see DuplicateAndClose).Describe the solution you'd like
Ideally a new option is added to
SocketTransportOptions
which, similar toCreateBoundListenSocket
, allows customizing thisSocket
-y operation.I'll have a PR sketching this out up shortly.#34345The text was updated successfully, but these errors were encountered: