[ECOS] __tcp_close() can't close connection in Redboot
Huang Sun I
hsy04081@yahoo.com.tw
Wed Oct 12 11:19:00 GMT 2005
Hi,
I am trying to build up httpd service in RedBoot.
And I met problem that I can't close connection by
calling __tcp_close() after replying data to
client,and the httpd sock state is always TIME_WAIT.
The client http can't get response from server after
recevive replying.I have to open another client http
to browser,but only once,problem is the same with
above
I described.
The following are rough code structure..
1> into listening state by calling __tcp_listen().
2>Checking TCP incoming connection
httpd_accept()
{
if (!is_idle) return;
if (!have_net) return;
__tcp_poll();
if (httpd_state != httpd_sock.state) {
// Something has changed
if (httpd_sock.state == _ESTABLISHED) {
// A new connection has arrived
//check Rx data and response
// close connection by calling
__tcp_close() .
}
if (httpd_sock.state == _CLOSED) {
// Get ready for another connection
//into listening state by calling
__tcp_listen().
}
}
httpd_state = httpd_sock.state;
}
RedBoot_idle(httpd_accept, RedBoot_IDLE_HTTPD/* 6000
*/);
Do I miss any procedure or other way that could fix
it?
thank you!
Huang Sun I
___________________________________________________ ÃîÃðæ Yahoo!ÃæÃ¦¼´Ârèà7.0 beta£¬ÃâÃM¾W÷ëÂÃÂÃÃÃã´ò£¡ http://messenger.yahoo.com.tw/beta.html
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss
mailing list