Skip to content

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

Open

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.

Activity

  1. changed the title [-]Creating a Socket from a file descriptor[/-] [+]Creating a Socket from a file descriptor and vice versa[/+] on Jun 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions