We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
there is a test from your example, when msg greater than 512,it will splite to some mini msg(512) and not rebuild in other peer.
var gobackn = require('../../lib'); var dgram = require('dgram');
var serverSocket = dgram.createSocket('udp4'); var clientSocket = dgram.createSocket('udp4');
serverSocket.bind(3001);
console.log('Bound the server socket to port 3001');
var server = new gobackn.Server(serverSocket); var client = new gobackn.Client(clientSocket, '127.0.0.1', 3001);
server.on('close', function () { serverSocket.close(); });
client.on('close', function () { clientSocket.close(); });
server.on('connection', function (connection) { connection.on('data', function (data) { console.log('data:' + data.toString('utf8')); });
connection.send(new Buffer('Hello, Client!')); });
client.on('data', function (data) { console.log('Client: %s', data.toString('utf8')); });
var info = ''; for(var i = 0; i < 16*1024; i ++) info += ' ' + i;
client.send(new Buffer('Hello, World!')); client.send(new Buffer('How are you doing?')); client.send(new Buffer(info));
The text was updated successfully, but these errors were encountered:
No branches or pull requests
there is a test from your example,
when msg greater than 512,it will splite to some mini msg(512)
and not rebuild in other peer.
var gobackn = require('../../lib');
var dgram = require('dgram');
var serverSocket = dgram.createSocket('udp4');
var clientSocket = dgram.createSocket('udp4');
serverSocket.bind(3001);
console.log('Bound the server socket to port 3001');
var server = new gobackn.Server(serverSocket);
var client = new gobackn.Client(clientSocket, '127.0.0.1', 3001);
server.on('close', function () {
serverSocket.close();
});
client.on('close', function () {
clientSocket.close();
});
server.on('connection', function (connection) {
connection.on('data', function (data) {
console.log('data:' + data.toString('utf8'));
});
connection.send(new Buffer('Hello, Client!'));
});
client.on('data', function (data) {
console.log('Client: %s', data.toString('utf8'));
});
var info = '';
for(var i = 0; i < 16*1024; i ++)
info += ' ' + i;
client.send(new Buffer('Hello, World!'));
client.send(new Buffer('How are you doing?'));
client.send(new Buffer(info));
The text was updated successfully, but these errors were encountered: