Disable Nagle's algorithm before we start the TLS handshake. Just speculation that it will help with some responsiveness.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4170 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
parent
f6742bebf3
commit
beda047eb0
@ -456,8 +456,6 @@ function handleConnection(client) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
client.noDelay = true;
|
|
||||||
|
|
||||||
client.onError(function(error) {
|
client.onError(function(error) {
|
||||||
logError(client.peerName + " - - [" + new Date() + "] " + error);
|
logError(client.peerName + " - - [" + new Date() + "] " + error);
|
||||||
});
|
});
|
||||||
@ -558,10 +556,14 @@ let kHost = "0.0.0.0"
|
|||||||
|
|
||||||
let socket = new Socket();
|
let socket = new Socket();
|
||||||
socket.bind(kHost, tildefriends.http_port).then(function() {
|
socket.bind(kHost, tildefriends.http_port).then(function() {
|
||||||
let listenResult = socket.listen(kBacklog, function() {
|
let listenResult = socket.listen(kBacklog, async function() {
|
||||||
socket.accept().then(handleConnection).catch(function(error) {
|
try {
|
||||||
|
let client = await socket.accept();
|
||||||
|
client.noDelay = true;
|
||||||
|
handleConnection(client);
|
||||||
|
} catch (error) {
|
||||||
logError("[" + new Date() + "] accept error " + error);
|
logError("[" + new Date() + "] accept error " + error);
|
||||||
});
|
}
|
||||||
});
|
});
|
||||||
}).catch(function(error) {
|
}).catch(function(error) {
|
||||||
logError("[" + new Date() + "] bind error " + error);
|
logError("[" + new Date() + "] bind error " + error);
|
||||||
@ -574,6 +576,7 @@ if (tildefriends.https_port) {
|
|||||||
return secureSocket.listen(kBacklog, async function() {
|
return secureSocket.listen(kBacklog, async function() {
|
||||||
try {
|
try {
|
||||||
let client = await secureSocket.accept();
|
let client = await secureSocket.accept();
|
||||||
|
client.noDelay = true;
|
||||||
client.tls = true;
|
client.tls = true;
|
||||||
const kCertificatePath = "data/httpd/certificate.pem";
|
const kCertificatePath = "data/httpd/certificate.pem";
|
||||||
const kPrivateKeyPath = "data/httpd/privatekey.pem";
|
const kPrivateKeyPath = "data/httpd/privatekey.pem";
|
||||||
|
@ -863,7 +863,6 @@ static void _tf_ssb_rpc_ebt_replicate_send_clock(tf_ssb_connection_t* connection
|
|||||||
|
|
||||||
tf_free(visible);
|
tf_free(visible);
|
||||||
|
|
||||||
/* TODO: Send it in bite-size chunks. */
|
|
||||||
tf_ssb_connection_rpc_send_json(connection, k_ssb_rpc_flag_stream, -request_number, full_clock, NULL, NULL, NULL);
|
tf_ssb_connection_rpc_send_json(connection, k_ssb_rpc_flag_stream, -request_number, full_clock, NULL, NULL, NULL);
|
||||||
JS_FreeValue(context, full_clock);
|
JS_FreeValue(context, full_clock);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user