Problems with too many connections

I am using GM_xmlhttpRequest (greasemonkey xmlhttpRequest) to communicate with my application. Every half second, it sends json to update the status of the page. I am launching 3 pages in FireFox. Using netstat -a, I got these results.

These are more than 200 lines. Why am I using so many ports!?! How can I ... not do this? and still interact with my application.

NOTE: The 3 pages I am on (e.g. google.com) do not match my domain (localhost), so I am sure that normal xmlhttpRequest will not work (I havent tried. I use jquery as a wrapper)

Active Connections

  Proto  Local Address          Foreign Address        State
  TCP    0.0.0.0:1234           My-PC:0             LISTENING
  TCP    127.0.0.1:1234         My-PC:19204         TIME_WAIT
  TCP    127.0.0.1:1234         My-PC:19205         TIME_WAIT
  [line 8...]
  [line 221...]
  TCP    127.0.0.1:1234         My-PC:19420         TIME_WAIT
  TCP    127.0.0.1:1234         My-PC:19421         TIME_WAIT
  TCP    127.0.0.1:1234         My-PC:19422         TIME_WAIT
  TCP    127.0.0.1:1234         My-PC:19423         TIME_WAIT
0
1

TIME_WAIT , , , . - , . , , , . , , . IP- src, src, dst IP, dst-, ( / ). .

, , , TIME_WAIT. , , -, , , , , . , , " ", . , , , , , . , , . , " ", (.. , ).

0

Source: https://habr.com/ru/post/1756123/


All Articles