a quick check on SO_LINGER option might help...

On Oct 14, 3:54 pm, Yogi <[email protected]> wrote:
> Thanks for ur quick response.
> We have tried SO_REUSEADDR but with that also bind() fails with the
> same error "Address already in use".
>
> On Oct 14, 3:12 pm, సురేష్ కుమార్ <[email protected]> wrote:
>
>
>
> > Hi yogi
>
> > Can you check the same scenario with the socket option SO_REUSEADDR being
> > set (using setsocketopt) before binding?
>
> > I hope, this would help resolve your issue.
>
> > Regards
> > Suresh Kumar S
>
> > On Wed, Oct 14, 2009 at 3:22 PM, Yogi <[email protected]> wrote:
>
> > > Hi All,
>
> > > I have a server-client pogram on android where server will be
> > > listening on 3000 port and client will send request on the same port.
> > > I am able to establish the connect successfully but when we are trying
> > > to close the socket, its going in CLOSE_WAIT state and sometime server
> > > is going in FIN_WAIT2 state.We are checking the socket state with
> > > netstat command in android.
> > > If we try to establish the connection again,server bind() fails with
> > > error "Address already in use".
> > > But if i wait for some 2-3minutes and then check the socket status its
> > > get closed successfully.Now, again able to establish the connect
> > > successfully.
>
> > > Can you please help me to understand, what is going wrong?
> > > Is there any way to force close the sockets?
>
> > > Thanks in advance,
> > > Yogi- Hide quoted text -
>
> - Show quoted text -

--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---

Reply via email to