lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] [lwip] reusing a socket from runtime to runtime


From: Jimi Simpson
Subject: [lwip-users] [lwip] reusing a socket from runtime to runtime
Date: Thu, 09 Jan 2003 00:14:15 -0000

Hi,

I have a build of the lwip stack running on a custom target and have
successfully managed to send data through a socket between a client app
and a simple VB server by directly interfacing the stack. Everything
appears to work fine all the way through to terminating the socket at
both the client and server ends. So what's the problem you ask?

Due the nature of my application it is highly unlikely that I will ever
have the luxury of a controlled termination of the socket, since the
power supply to the client hardware can be lost at any time and
anticipating this is impractical (maybe not even possible) and this is
where the problem arises. When the client power resumes it attempts to
open the socket to the host again, but unfortunately the host is still
aware of the existing connection and simply appears to refuse to
acknowledge the request to re-open the socket afresh.

A few ideas spring to mind to work around this (although I haven't
thought them fully through)

1) I could periodically poll the connected clients from the server app
and drop any clients that do not respond.
2) I could simply open a socket, send data and close the socket for each
message. This is obviously at a significant overhead and loss of power
during any communication will bring about the same problem.
3) I could re-implement the section of code that generates a port number
to provide one that is random and maybe this is what I should do.

QUESTION:

Does anyone have an identical or similar experience of a situation like
this and if so could you shed some light on possible ways to overcome or
work around the problem. Maybe I am just missing some understanding of
sockets due to my limited experience but any help will be most
appreciated.

Best regards,

Jimi
[This message was sent through the lwip discussion list.]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]