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
26a7fb4a
Commit
26a7fb4a
authored
Aug 18, 2021
by
Dennis Willers
🏀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Socketserver with test client
parent
fa9d823f
Pipeline
#412
passed with stages
in 2 minutes and 46 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
3 deletions
+24
-3
socket.js
socket.js
+24
-3
No files found.
socket.js
View file @
26a7fb4a
...
@@ -142,7 +142,7 @@ server.listen(3000);
...
@@ -142,7 +142,7 @@ server.listen(3000);
console.log('Server is listening at port' + port);
console.log('Server is listening at port' + port);
console.log('Server ip :' + ipaddr);
console.log('Server ip :' + ipaddr);
console.log('Server is IP4/IP6 : ' + family);
console.log('Server is IP4/IP6 : ' + family);
});
*/
});
...
@@ -157,12 +157,12 @@ if(islistening){
...
@@ -157,12 +157,12 @@ if(islistening){
setTimeout(function(){
setTimeout(function(){
server.close();
server.close();
},5000000);
},5000000);
*/
//---------------------client----------------------
//---------------------client----------------------
// creating a custom socket client and connecting it....
// creating a custom socket client and connecting it....
/*
var client = new net.Socket();
var
client
=
new
net
.
Socket
();
client
.
connect
({
client
.
connect
({
port
:
3000
port
:
3000
});
});
...
@@ -217,3 +217,24 @@ clients.on('end', () => {
...
@@ -217,3 +217,24 @@ clients.on('end', () => {
console.log('disconnected from server');
console.log('disconnected from server');
});
});
*/
*/
// ---------------------------------------------- //
/*var client = new net.Socket();
client.connect(8080, 'm.willers.digital', function() {
console.log('Connected');
client.write('Hello, server! Love, Client.');
});
client.on('data', function(data) {
console.log('Received: ' + data);
client.destroy(); // kill client after server's response
});
client.on('close', function() {
console.log('Connection closed');
});*/
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