|
-
May 24th, 2005, 07:46 PM
#1
Thread Starter
Addicted Member
regarding winsock close event
hi, i wish to enquire a bit information regarding winsock close event.
let say, if we created a tcp server which able to accept multiple connection on port 80.
let say, a client connected to port 8080, we create a new socket and direct the client to the new sock with random port.
Code:
Proto Local Address Foreign Address State
TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING
TCP 127.0.0.1:1728 127.0.0.1:8080 ESTABLISHED
TCP 127.0.0.1:8080 127.0.0.1:1728 ESTABLISHED
so we got something like above when we netstat. now let say, the client program was not written properly, it didn't close it socket after the application shutdown. so, let say if i terminate the client application now, what i got in netstat is like below.
Code:
Proto Local Address Foreign Address State
TCP 127.0.0.1:1728 127.0.0.1:8080 FIN_WAIT_2
TCP 127.0.0.1:8080 127.0.0.1:1728 CLOSE_WAIT
so, since most of the winsock tutorial site teach us to write server that create a new sock based on (when sckClosed socket was not found in current winsock control array) so, when a new client try to connect us, our server create a new socket for it.
now, my question is, does this mean, somebody could (i mean fill up our server winsock control array which is 65536 only using such technique?)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|