Skip to content

Commit c39d13e

Browse files
committed
fix: resolve windows header order and doc lint errors
1 parent b884430 commit c39d13e

2 files changed

Lines changed: 5 additions & 11 deletions

File tree

lib/net.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ Socket.prototype.setTOS = function(tos) {
674674
return this;
675675
}
676676

677-
if (this._handle.setTOS && tos !== this[kSetTOS]) {
677+
if (tos !== this[kSetTOS]) {
678678
this[kSetTOS] = tos;
679679
const err = this._handle.setTOS(tos);
680680
if (err) {

src/tcp_wrap.cc

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,11 @@
1919
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

22-
#include "tcp_wrap.h" // 1. Implementation header first
23-
24-
// 2. Windows System Headers (MUST BE BEFORE Node.js internals)
22+
#include "tcp_wrap.h"
2523
#ifdef _WIN32
2624
#include <winsock2.h>
2725
#include <ws2tcpip.h>
2826
#endif
29-
30-
// 3. Node.js Internal Headers
3127
#include "connect_wrap.h"
3228
#include "connection_wrap.h"
3329
#include "env-inl.h"
@@ -39,15 +35,13 @@
3935
#include "stream_base-inl.h"
4036
#include "stream_wrap.h"
4137
#include "util-inl.h"
42-
43-
// 4. Standard C++ & POSIX Headers
4438
#include <cerrno>
4539
#include <cstdlib>
4640

4741
#ifndef _WIN32
48-
#include <netinet/in.h> // Required for IPPROTO_IP
49-
#include <netinet/ip.h> // Required for IP_TOS
50-
#include <netinet/ip6.h> // Required for IPV6_TCLASS
42+
#include <netinet/in.h>
43+
#include <netinet/ip.h>
44+
#include <netinet/ip6.h>
5145
#include <sys/socket.h>
5246
#endif
5347

0 commit comments

Comments
 (0)