posix-api-0.7.2.0: posix bindings
Safe HaskellSafe-Inferred
LanguageHaskell2010

Posix.Struct.SocketAddressInternet.Peek

Description

Accessors for reading from struct sockaddr_in:

struct sockaddr_in {
    sa_family_t    sin_family; /* address family: AF_INET */
    in_port_t      sin_port;   /* port in network byte order */
    struct in_addr sin_addr;   /* internet address */
};
Synopsis

Documentation

address :: Ptr SocketAddressInternet -> IO (Fixed 'BigEndian Word32) Source #

Get sin_addr.saddr. This works on Linux because struct in_addr has a single 32-bit field. I do not know how to perform this in a portable way with hsc2hs.