@@ -126,13 +126,13 @@ _base_socket::~_base_socket() { clean_up_socket(socket); }
126126void
127127_base_socket::get_local_address (_Out_ PSOCKADDR& address, _Out_ int & address_length) const
128128{
129- // Query the current local address from the socket
129+ // Query the current local address from the socket.
130130 int error = getsockname (socket, (PSOCKADDR)&local_address, &local_address_size);
131131 if (error != 0 ) {
132132 FAIL (" Failed to query local address of socket with error: " << WSAGetLastError ());
133133 }
134134
135- // Return the freshly queried address
135+ // Return the freshly queried address.
136136 address = (PSOCKADDR)&local_address;
137137 address_length = local_address_size;
138138}
@@ -486,11 +486,11 @@ _datagram_server_socket::_datagram_server_socket(
486486 FAIL (" datagram_client_socket class only supports sockets of type SOCK_DGRAM or SOCK_RAW and protocols of type "
487487 " IPPROTO_UDP, IPPROTO_IPV4 or IPPROTO_IPV6)" );
488488
489- // Enable redirect context for UDP sockets
489+ // Enable redirect context for UDP sockets.
490490 if (protocol == IPPROTO_UDP) {
491491 DWORD option_value = 1 ;
492492
493- // Enable IPv4 redirect context only for IPv4 and Dual stack sockets
493+ // Enable IPv4 redirect context only for IPv4 and Dual stack sockets.
494494 if (family == IPv4 || family == Dual) {
495495 int result = setsockopt (
496496 socket,
@@ -503,7 +503,7 @@ _datagram_server_socket::_datagram_server_socket(
503503 }
504504 }
505505
506- // Enable IPv6 redirect context only for IPv6 and Dual stack sockets
506+ // Enable IPv6 redirect context only for IPv6 and Dual stack sockets.
507507 if (family == IPv6 || family == Dual) {
508508 int result = setsockopt (
509509 socket,
@@ -533,15 +533,15 @@ _datagram_server_socket::post_async_receive()
533533 FAIL (" WSACreateEvent failed with error: " << WSAGetLastError ());
534534 }
535535
536- // Set up WSAMSG structure for WSARecvMsg
536+ // Set up WSAMSG structure for WSARecvMsg.
537537 recv_msg.name = (LPSOCKADDR)&sender_address;
538538 recv_msg.namelen = sender_address_size;
539539 recv_msg.lpBuffers = &wsa_recv_buffer;
540540 recv_msg.dwBufferCount = 1 ;
541541 recv_msg.Control = wsa_control_buffer;
542542 recv_msg.dwFlags = 0 ;
543543
544- // Post an asynchronous receive using WSARecvMsg to get ancillary data
544+ // Post an asynchronous receive using WSARecvMsg to get ancillary data.
545545 error = receive_message (socket, &recv_msg, nullptr , &overlapped, nullptr );
546546
547547 if (error != 0 ) {
0 commit comments