You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a specific use case. I’m using pekko server to handle REST APIs calls. I need to get the file descriptor associated with socket connection then pass it to some legacy C program.
I'd like to request an API to get the file descriptor associated with socket connection for GET/POST REST APIs calls.
The text was updated successfully, but these errors were encountered:
I don't think it is a good idea for us to expose the internals of server sockets as file descriptors. Maybe someone else will have another view.
You might want to consider using another server tool that works at a lower level. You could take the requests on this other server and still use Pekko streams (or actors) if you want to continue to use Pekko for processing the requests.
I also suspect you might be better off with a lower-level API, but I'm pretty curious about your more exact use case :)
'Simply' passing the server socket to some other application will likely not work, as the connection is 'managed' by Pekko HTTP: for HTTP/1 it might do pipelining or wrap the connection in HTTPS, for HTTP/2 it might even do multiplexing - if the C program would read or write from that filesystem that would all break.
I guess perhaps you could stream the entity data to/from the application though - is that what you'd want?
I have a specific use case. I’m using pekko server to handle REST APIs calls. I need to get the file descriptor associated with socket connection then pass it to some legacy C program.
I'd like to request an API to get the file descriptor associated with socket connection for GET/POST REST APIs calls.
The text was updated successfully, but these errors were encountered: