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

Need to fix a bug of 'disconnection' for 'net' module. #11

Open
hyunjunekim opened this issue Jan 1, 2018 · 0 comments
Open

Need to fix a bug of 'disconnection' for 'net' module. #11

hyunjunekim opened this issue Jan 1, 2018 · 0 comments

Comments

@hyunjunekim
Copy link
Member


`server.on('connection',``` function(socket) {
console.log('Server> a client connected');
socket.on('close', function() {
console.log('Server> a client disconnected');
});
socket.destroy();
});

var socket = new net.Socket();

socket.connect(1234, "127.0.0.1", function(status) {
});

socket.on('close', function() {
console.log('Client> socket closed');
});
`
Above codes, just called 'close' on server-side.
We expected to call both server-side and client-side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant