File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -20,15 +20,6 @@ import Network.Socket.Internal
2020import Network.Socket.Syscall (socket )
2121import Network.Socket.Types
2222
23- -----------------------------------------------------------------------------
24-
25- -- | Either a host name e.g., @\"haskell.org\"@ or a numeric host
26- -- address string consisting of a dotted decimal IPv4 address or an
27- -- IPv6 address e.g., @\"192.168.0.1\"@.
28- type HostName = String
29- -- | Either a service name e.g., @\"http\"@ or a numeric port number.
30- type ServiceName = String
31-
3223-----------------------------------------------------------------------------
3324-- Address and service lookups
3425
Original file line number Diff line number Diff line change @@ -74,6 +74,8 @@ module Network.Socket.Types (
7474 , defaultProtocol
7575 , PortNumber
7676 , defaultPort
77+ , HostName
78+ , ServiceName
7779
7880 -- * Low-level helpers
7981 , zeroMemory
@@ -291,6 +293,13 @@ type ProtocolNumber = CInt
291293defaultProtocol :: ProtocolNumber
292294defaultProtocol = 0
293295
296+ -- | Either a host name e.g., @\"haskell.org\"@ or a numeric host
297+ -- address string consisting of a dotted decimal IPv4 address or an
298+ -- IPv6 address e.g., @\"192.168.0.1\"@.
299+ type HostName = String
300+ -- | Either a service name e.g., @\"http\"@ or a numeric port number.
301+ type ServiceName = String
302+
294303-----------------------------------------------------------------------------
295304-- Socket types
296305
@@ -1062,7 +1071,7 @@ type ScopeID = Word32
10621071--
10631072-- See also 'Network.Socket.socketFromEndpoint'.
10641073data SockEndpoint
1065- = EndpointByName ! String ! PortNumber
1074+ = EndpointByName ! HostName ! PortNumber
10661075 | EndpointByAddr ! SockAddr
10671076 deriving (Eq , Ord )
10681077
You can’t perform that action at this time.
0 commit comments