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
20
20
import Network.Socket.Syscall (socket )
21
21
import Network.Socket.Types
22
22
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
-
32
23
-----------------------------------------------------------------------------
33
24
-- Address and service lookups
34
25
Original file line number Diff line number Diff line change @@ -74,6 +74,8 @@ module Network.Socket.Types (
74
74
, defaultProtocol
75
75
, PortNumber
76
76
, defaultPort
77
+ , HostName
78
+ , ServiceName
77
79
78
80
-- * Low-level helpers
79
81
, zeroMemory
@@ -291,6 +293,13 @@ type ProtocolNumber = CInt
291
293
defaultProtocol :: ProtocolNumber
292
294
defaultProtocol = 0
293
295
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
+
294
303
-----------------------------------------------------------------------------
295
304
-- Socket types
296
305
@@ -1062,7 +1071,7 @@ type ScopeID = Word32
1062
1071
--
1063
1072
-- See also 'Network.Socket.socketFromEndpoint'.
1064
1073
data SockEndpoint
1065
- = EndpointByName ! String ! PortNumber
1074
+ = EndpointByName ! HostName ! PortNumber
1066
1075
| EndpointByAddr ! SockAddr
1067
1076
deriving (Eq , Ord )
1068
1077
You can’t perform that action at this time.
0 commit comments