RTC Forums
November 21, 2024, 03:40:07 PM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Help
Login
Register
RTC Forums
>
Subscription
>
Support
>
TCP port connections in CLOSE_WAIT state
Pages: [
1
]
« previous
next »
Print
Author
Topic: TCP port connections in CLOSE_WAIT state (Read 4012 times)
thomh
RTC License+
Posts: 17
TCP port connections in CLOSE_WAIT state
«
on:
February 11, 2021, 04:05:10 PM »
Hi,
I have an RTC server with a browser front end. What happens to the server thread when a browser makes a request to the server and the browser is closed before the server response is received back?
I did a netstat -ano on the server port and showed a lot of open TCP port connections that are in a CLOSE_WAIT state.
What does this mean?
Thanks,
Thom
Logged
D.Tkalcec (RTC)
Administrator
Posts: 1881
Re: TCP port connections in CLOSE_WAIT state
«
Reply #1 on:
February 11, 2021, 04:18:11 PM »
If you are using the TRtcHttpServer component on Windows and with its default non-blocking setting ("Blocking" property is set to FALSE), then the component will be using a Thread ONLY when data is actively being sent, received or processed. If no data is being sent, received or processed (which normally only happens in "user" code), then no Threads would be used, regardless of the state of a TCP/IP connection.
Connections which are in some semi-closed state, or connections which are open but are NOT actively used (no data is being sent, received or processed) would still use some System resources like a Socket Handle and some RAM (Objects holding connection info), but they won't be using any Threads (no CPU drain) ... provided your Server is running on Windows and the "Blocking" property on the "TRtcHttpServer" component is set to FALSE.
Connections which have been closed by one side but not the other (CLOSE_WAIT and TIME_WAIT state) would normally be closed by the Socket API after a time-out, which could be anywhere between a few minutes and a couple of hours, depending on your OS preferences.
Best Regards,
Danijel Tkalcec
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Dashboard
-----------------------------
=> General
=> 3rd-Party
=> Quick Start
-----------------------------
Subscription
-----------------------------
=> Support
Loading...