prepSocket :: Scurry -> IO Socket
prepSocket c = do
    s <- socket AF_INET Datagram defaultProtocol
    setSocketOption s Broadcast 4
    bindSocket s sockAddr
    return s
    where
        sockAddr = SockAddrInet (fromIntegral . unIPPort . bindPort $ c)
                                (unIPV4Addr . bindAddr $ c)
prepSocket :: Scurry -> IO Socket
prepSocket c = do
    s <- socket AF_INET Datagram defaultProtocol
    setSocketOption s Broadcast 4
    bindSocket s sockAddr
    return s
    where
        sockAddr = SockAddrInet (fromIntegral . unIPPort . bindPort $ c)
                                (unIPV4Addr . bindAddr $ c)
prepSocket c = do
    s <- socket AF_INET Datagram defaultProtocol
    setSocketOption s Broadcast 4
    bindSocket s sockAddr
    return s
    where
        sockAddr = SockAddrInet (fromIntegral . unIPPort . bindPort $ c)
                                (unIPV4Addr . bindAddr $ c)