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
@@ -289,6 +291,13 @@ type ProtocolNumber = CInt
289
291
defaultProtocol :: ProtocolNumber
290
292
defaultProtocol = 0
291
293
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
+
292
301
-----------------------------------------------------------------------------
293
302
-- Socket types
294
303
@@ -1056,7 +1065,7 @@ type ScopeID = Word32
1056
1065
--
1057
1066
-- See also 'Network.Socket.socketFromEndpoint'.
1058
1067
data SockEndpoint
1059
- = EndpointByName ! String ! PortNumber
1068
+ = EndpointByName ! HostName ! PortNumber
1060
1069
| EndpointByAddr ! SockAddr
1061
1070
deriving (Eq , Ord )
1062
1071
You can’t perform that action at this time.
0 commit comments