Linux -Blue forest free software | Return to home page | Site Map | Search WWW | Contact Us |
Your current position : Homepage > Free Software > Technological exchanges >Application Programming


    

Blue Forest http://www.lslnet.com at 10:18 on June 6, 2006


Socket Programming?

TCP Server, clients know how when to withdraw?

Socket Programming?

Use select detection ah

Socket Programming?

Client services from the end is to send a signal FIN?

Socket Programming?

Socket Programming?

Yes, the closure of the client, will be issued FIN messaging service terminal will send an ACK response, the client then enter FIN_WAIT2 state, the terminal will enter service CLOSE_WAIT state.

When the service termination FIN messages received after the return of a select things readable, and recv judge recv return value of 0 if it is to return, said Client closed.

Socket Programming?

Return -1 also read with the other closed!
Similarly, it read back Client Server Table 1 is not closed?

Socket Programming?

1 is expressed wrong

Socket Programming?

It is not a continuous link with the other judge read, test the return value is not 0?

Socket Programming?

Yes, you can write a procedure to test.



 Privacy Policy  Copyright © 1999-2000 LSLNET.COM. All rights reserved. Blue Forest website owners. E-mail : Webmaster@lslnet.com