22import Darwin
33#endif
44import SystemPackage
5- @_implementationOnly import CSocket
65
76/// POSIX Socket Type
87@frozen
@@ -31,21 +30,21 @@ public extension SocketType {
3130 ///
3231 /// Provides sequenced, reliable, two-way, connection-based byte streams.
3332 /// An out-of-band data transmission mechanism may be supported.
34- static var stream : SocketType { SocketType ( SOCK_STREAM ) }
33+ static var stream : SocketType { SocketType ( _SOCK_STREAM ) }
3534
3635 /// Supports datagrams (connectionless, unreliable messages of a fixed maximum length).
37- static var datagram : SocketType { SocketType ( SOCK_DGRAM ) }
36+ static var datagram : SocketType { SocketType ( _SOCK_DGRAM ) }
3837
3938 /// Provides raw network protocol access.
40- static var raw : SocketType { SocketType ( SOCK_RAW ) }
39+ static var raw : SocketType { SocketType ( _SOCK_RAW ) }
4140
4241 /// Provides a reliable datagram layer that does not guarantee ordering.
43- static var reliableDatagramMessage : SocketType { SocketType ( SOCK_RDM ) }
42+ static var reliableDatagramMessage : SocketType { SocketType ( _SOCK_RDM ) }
4443
4544 /// Provides a sequenced, reliable, two-way connection-based data transmission
4645 /// path for datagrams of fixed maximum length; a consumer is required to read
4746 /// an entire packet with each input system call.
48- static var sequencedPacket : SocketType { SocketType ( SOCK_SEQPACKET ) }
47+ static var sequencedPacket : SocketType { SocketType ( _SOCK_SEQPACKET ) }
4948}
5049
5150#if os(Linux)
@@ -54,6 +53,6 @@ public extension SocketType {
5453 /// Datagram Congestion Control Protocol
5554 ///
5655 /// Linux specific way of getting packets at the dev level.
57- static var datagramCongestionControlProtocol : SocketType { SocketType ( SOCK_DCCP ) }
56+ static var datagramCongestionControlProtocol : SocketType { SocketType ( _SOCK_DCCP ) }
5857}
5958#endif
0 commit comments