public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] __tcp_close() can't close connection in Redboot
@ 2005-10-12 11:19 Huang Sun I
  2005-10-12 12:53 ` [ECOS] " Grant Edwards
  0 siblings, 1 reply; 8+ messages in thread
From: Huang Sun I @ 2005-10-12 11:19 UTC (permalink / raw)
  To: ecos-discuss

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=big5, Size: 1570 bytes --]

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-10-12 15:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-12 11:19 [ECOS] __tcp_close() can't close connection in Redboot Huang Sun I
2005-10-12 12:53 ` [ECOS] " Grant Edwards
2005-10-12 13:16   ` Andrew Lunn
2005-10-12 13:28     ` Gary Thomas
2005-10-12 13:33       ` Grant Edwards
2005-10-12 13:37         ` Gary Thomas
2005-10-12 15:07           ` Huang Sun I
2005-10-12 13:30     ` Grant Edwards

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).