Getting file descriptor associated with socket connection

Hello,

I have a specific use case. I’m using Akka 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.

Is it possible to get file descriptor associated with socket connection for GET/POST REST APIs calls?

Thanks,