Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix exception on node 9 #5

Merged
merged 1 commit into from
Feb 2, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions client.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
var Handle = require('./handle')
var TCP = process.binding('tcp_wrap').TCP
var TCPConnectWrap = process.binding('tcp_wrap').TCPConnectWrap
var TCPWrap = process.binding('tcp_wrap')
var TCPConnectWrap = TCPWrap.TCPConnectWrap
var pull = require('pull-stream')
var net = require('net')

module.exports = function (port, address, cb) {
cb = cb || function () {}
port |= 0
var clientHandle = new TCP()
var clientHandle = TCPWrap.constants ? new TCPWrap.TCP(TCPWrap.constants.SOCKET) : new TCPWrap.TCP()
var connect = new TCPConnectWrap()
var stream

4 changes: 2 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
var TCP = process.binding('tcp_wrap').TCP
var TCPWrap = process.binding('tcp_wrap')
var net = require('net')
var Handle = require('./handle')

function noop () {}

module.exports = function (onConnect) {
var server = new TCP()
var server = TCPWrap.constants ? new TCPWrap.TCP(TCPWrap.constants.SERVER) : new TCPWrap.TCP()

return {
listen: function (port, addr, cb) {