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
@@ -289,6 +291,13 @@ type ProtocolNumber = CInt
289291defaultProtocol :: ProtocolNumber
290292defaultProtocol = 0
291293
294+ -- | Either a host name e.g., @\"haskell.org\"@ or a numeric host
295+ -- address string consisting of a dotted decimal IPv4 address or an
296+ -- IPv6 address e.g., @\"192.168.0.1\"@.
297+ type HostName = String
298+ -- | Either a service name e.g., @\"http\"@ or a numeric port number.
299+ type ServiceName = String
300+
292301-----------------------------------------------------------------------------
293302-- Socket types
294303
@@ -1056,7 +1065,7 @@ type ScopeID = Word32
10561065--
10571066-- See also 'Network.Socket.socketFromEndpoint'.
10581067data SockEndpoint
1059- = EndpointByName ! String ! PortNumber
1068+ = EndpointByName ! HostName ! PortNumber
10601069 | EndpointByAddr ! SockAddr
10611070 deriving (Eq , Ord )
10621071
You can’t perform that action at this time.
0 commit comments