Commit dc1dbaa2 authored by sof's avatar sof
Browse files

[project @ 1999-06-25 16:52:48 by sof]

Document the SocketPrim.PortNumber type
parent ea342fbc
...@@ -837,11 +837,17 @@ recvFrom :: Hostname -> PortID -> IO String ...@@ -837,11 +837,17 @@ recvFrom :: Hostname -> PortID -> IO String
socketPort :: Socket -> IO PortID socketPort :: Socket -> IO PortID
data PortID -- PortID is a non-abstract type data PortID -- PortID is a non-abstract type
= Service String -- Service Name eg "ftp" = Service String -- Service Name eg "ftp"
| PortNumber Int -- User defined Port Number | PortNumber PortNumber -- User defined Port Number
| UnixSocket String -- Unix family socket in file system | UnixSocket String -- Unix family socket in file system
type Hostname = String type Hostname = String
-- 16-bit value (stored in network byte order).
data PortNumber
-- instance of: Eq, Num, Show.
mkPortNumber :: Int -> PortNumber
</verb></tscreen> </verb></tscreen>
Various examples of networking Haskell code are provided in Various examples of networking Haskell code are provided in
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment