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
396a507b
Commit
396a507b
authored
Aug 20, 2021
by
Dennis Willers
🏀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add \n so a line ends
parent
ee209935
Pipeline
#415
passed with stages
in 2 minutes and 42 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
socket.js
socket.js
+3
-3
No files found.
socket.js
View file @
396a507b
...
...
@@ -74,7 +74,7 @@ server.on('connection',function(socket){
.
then
(
res
=>
{
console
.
log
(
'
Prepare:
'
,
res
.
headers
,
res
.
data
);
//echo data
var
is_kernel_buffer_full
=
socket
.
write
(
'
FROMSERVER:
'
+
JSON
.
stringify
(
res
.
headers
)
+
JSON
.
stringify
(
res
.
data
)
);
var
is_kernel_buffer_full
=
socket
.
write
(
JSON
.
stringify
(
res
.
headers
)
+
JSON
.
stringify
(
res
.
data
)
+
'
\n
'
);
if
(
is_kernel_buffer_full
){
console
.
log
(
'
Data was flushed successfully from kernel buffer i.e written successfully!
'
);
}
else
{
...
...
@@ -217,7 +217,7 @@ client.on('data',function(data){
// 87.78.129.86
c
onst
clients
=
net
.
connect
({
host
:
'
localhost
'
,
port
:
3000
},
()
=>
{
/*
onst clients = net.connect({host: 'localhost', port: 3000}, () => {
console.log('connected to server!');
clients.write('Hello World Client!\r\n');
//test(clients);
...
...
@@ -232,7 +232,7 @@ clients.on('data', (data) => {
});
//*/
async
function
test
(
clients
)
{
/*
async function test(clients) {
let i = 0;
while (true) {
await new Promise(resolve => setTimeout(resolve, 5000));
...
...
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