This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
FW: Closing TCP client sockets?
- From: "Alex Lindeijer" <Alex dot L at 3D-Perception dot com>
- To: <ecos-discuss at ecos dot sourceware dot org>
- Date: Mon, 1 Mar 2010 08:33:56 +0100
- Subject: [ECOS] FW: [ECOS] Closing TCP client sockets?
Alex Lindeijer | 3D perception AS
Senior System Designer
alex.l@3d-perception.com
T: +47 97540959
www.3D-perception.com
Achieving Your Vision
-----Original Message-----
From: Alex Lindeijer
Sent: 28. februar 2010 22:06
To: 'Ãyvind Harboe'
Subject: RE: [ECOS] Closing TCP client sockets?
Hi
Yes that is
int on=1;
if (setsockopt(listener, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) < 0)
{
perror("setsockopt(SO_REUSEADDR) failed");
}
If I use that I get the following ASSERT:
"Recorded alarm not in the future! Starved network thread?"
I also get the "address already in use" erro also when changing IP address ie not using the same IP address
Alex Lindeijer | 3D perception AS
Senior System Designer
alex.l@3d-perception.com
T: +47 97540959
www.3D-perception.com
Achieving Your Vision
-----Original Message-----
From: ecos-discuss-owner@ecos.sourceware.org [mailto:ecos-discuss-owner@ecos.sourceware.org] On Behalf Of Ãyvind Harboe
Sent: 27. februar 2010 13:01
To: ecos-discuss@ecos.sourceware.org
Subject: [ECOS] Closing TCP client sockets?
> When starting the server again and try to bind & listen again. We get a
> 'address already in use error' on bind.
There is a standard POSIX option to reuse addresses, did you add that?
I don't recall the precise option name offhand.
I think you'll get the same error under Linux/Cygwin.
--
Ãyvind Harboe
Visit us at Embedded World, March 2nd-4th. IS2T's stand, HALL 10 - 118
http://www.zylin.com/events_embeddedworld.html
US toll free 1-866-980-3434 / International +47 51 63 25 00
http://www.zylin.com/zy1000.html
ARM7 ARM9 ARM11 XScale Cortex
JTAG debugger and flash programmer
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss