- install dependencies
npm i
- start the application
node index.js
- connect to the server
telnet 127.0.0.1 3000
- stop the application with
ctrl-c
- application will not stop because of the active client connection
- type
GET / HTTP/1.1
on terminal with the telnet session and press enter/return twice - you will see the server response with
Connection: Close
response header and connection will be terminated, then application will exit - comment out the line
containing
res.set('Connection', 'Close');
- start the application and repeat all the steps
- connection will not be terminated and application will not exit until killed or connection closed by the client
-
Notifications
You must be signed in to change notification settings - Fork 0
artursudnik/keep-alive-demo
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published