Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Voting
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dennis Willers
Voting
Commits
f4c9378c
Commit
f4c9378c
authored
Aug 22, 2021
by
Dennis Willers
🏀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
for test reason set socket client timeout at 60 seconds
parent
9622a83d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
socket.js
socket.js
+2
-2
No files found.
socket.js
View file @
f4c9378c
...
@@ -60,7 +60,7 @@ server.on('connection',function(socket){
...
@@ -60,7 +60,7 @@ server.on('connection',function(socket){
socket
.
setEncoding
(
'
utf8
'
);
socket
.
setEncoding
(
'
utf8
'
);
socket
.
setTimeout
(
80
0000
,
function
(){
socket
.
setTimeout
(
6
0000
,
function
(){
// called after timeout -> same as socket.on('timeout')
// called after timeout -> same as socket.on('timeout')
// it just tells that soket timed out => its ur job to end or destroy the socket.
// it just tells that soket timed out => its ur job to end or destroy the socket.
// socket.end() vs socket.destroy() => end allows us to send final data and allows some i/o activity to finish before destroying the socket
// socket.end() vs socket.destroy() => end allows us to send final data and allows some i/o activity to finish before destroying the socket
...
@@ -254,7 +254,7 @@ client.on('data',function(data){
...
@@ -254,7 +254,7 @@ client.on('data',function(data){
// 87.78.129.86 | localhost
// 87.78.129.86 | localhost
const
testClient
=
net
.
connect
({
host
:
'
localhost
'
,
port
:
3000
},
()
=>
{
/*const testClient = net.connect({host: '87.78.129.86', port: 3201
}, () => {
console.log('connected to server!');
console.log('connected to server!');
//testClient.write('Hello World Client!\r\n');
//testClient.write('Hello World Client!\r\n');
testClient.write(JSON.stringify({"mapId":"7fsfRSUCQ7YwfBEdRk_GivW6qzj","userId":"aKBNg9fbReqLedLiz1KFfA","name":"Summer 2021 - 01"}));
testClient.write(JSON.stringify({"mapId":"7fsfRSUCQ7YwfBEdRk_GivW6qzj","userId":"aKBNg9fbReqLedLiz1KFfA","name":"Summer 2021 - 01"}));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment