Skip to content

Commit 480302e

Browse files
committed
[socket.dgram], [socket.stream] Add same type requirements.
[socket.reqmts.native] Define how specification uses native_handle_type Fixes NB GB-13 (PDTS)
1 parent 0c84969 commit 480302e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/sockets.tex

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,10 @@
203203
Several classes described in this Technical Specification have a member type \tcode{native_handle_type}, a member function \tcode{native_handle}, and member functions that accept arguments of type \tcode{native_handle_type}. The presence of these members and their semantics is
204204
\impldef{presence and meaning of \tcode{native_handle_type} and \tcode{native_handle}}.
205205

206+
\pnum
207+
When an operation has its effects specified as if by passing the result of \tcode{native_handle()}
208+
to a POSIX function the effect is as if \tcode{native_handle_type} is the type \tcode{int}.
209+
206210
\pnum
207211
\begin{note} These members allow implementations to provide access to their implementation details. Their names are specified to facilitate portable compile-time detection. Actual use of these members is inherently non-portable. For operating systems that are based on POSIX, implementations are encouraged to define the \tcode{native_handle_type} for sockets as \tcode{int}, representing the native file descriptor associated with the socket. \end{note}
208212

@@ -2356,6 +2360,9 @@
23562360
\pnum
23572361
When an operation has its effects specified as if by passing the result of \tcode{native_handle()} to a POSIX function, then the operation fails with error condition \tcode{errc::bad_file_descriptor} if \tcode{is_open() == false} at the point in the effects when the POSIX function is called.
23582362

2363+
\pnum
2364+
If \tcode{native_handle_type} and \tcode{basic_socket<Protocol>::native_handle_type}
2365+
are both defined then they name the same type.
23592366

23602367
\rSec2[socket.dgram.cons]{\tcode{basic_datagram_socket} constructors}
23612368

@@ -2980,6 +2987,10 @@
29802987
\pnum
29812988
When an operation has its effects specified as if by passing the result of \tcode{native_handle()} to a POSIX function, then the operation fails with error condition \tcode{errc::bad_file_descriptor} if \tcode{is_open() == false} at the point in the effects when the POSIX function is called.
29822989

2990+
\pnum
2991+
If \tcode{native_handle_type} and \tcode{basic_socket<Protocol>::native_handle_type}
2992+
are both defined then they name the same type.
2993+
29832994

29842995
\rSec2[socket.stream.cons]{\tcode{basic_stream_socket} constructors}
29852996

0 commit comments

Comments
 (0)