Skip to content

Creating a Socket from a file descriptor and vice versa #62

@sternenseemann

Description

@sternenseemann

I am currently trying to add systemd socket activation to my socket-based application. Therefore I have to construct a Socket from a file descriptor, similarly to Network.Socket's mkSocket and also convert the socket to a file descriptor to store it afterwards.

I am wondering, if this would be functionality that should be added to System.Socket.Unsafe or similar, since I guess this problem arises from time to time. The biggest problem I see is ensuring that the socket and the address family/socket type match with the type we convert to in the library.

Edit: Flesh out the question.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions