Network.Utils

MissingH-1.4.0.1: Large utility library

Copyright | Copyright (C) 2004-2011 John Goerzen
License | BSD3
Maintainer | John Goerzen <jgoerzen@complete.org>
Stability | provisional
Portability | systems with networking
Safe Haskell | None
Language | Haskell98

Network.Utils

Description

This module provides various helpful utilities for dealing with networking

Written by John Goerzen, jgoerzen@complete.org

Synopsis

- niceSocketsDo :: IO a -> IO a
- connectTCP :: HostName -> PortNumber -> IO Socket
- connectTCPAddr :: SockAddr -> IO Socket
- listenTCPAddr :: SockAddr -> Int -> IO Socket
- showSockAddr :: SockAddr -> IO String

# Documentation

niceSocketsDo :: IO a -> IO a #

Sets up the system for networking. Similar to the built-in withSocketsDo (and actually, calls it), but also sets the SIGPIPE handler so that signal is ignored.

Example:

    main = niceSocketsDo $ do { ... }

connectTCP :: HostName -> PortNumber -> IO Socket #

connectTCPAddr :: SockAddr -> IO Socket #

listenTCPAddr :: SockAddr -> Int -> IO Socket #

showSockAddr :: SockAddr -> IO String #