Board index » delphi » Indy, new version, new problems (in my case with the TidNNTP)

Indy, new version, new problems (in my case with the TidNNTP)

Hallo Indy team,
today i switched to 8.00 beta 10, fulld4.bat, recompiled my v50 project,
run test, and ...
Ras dials to isp, mail received, ok, mail send, ok, news server connect,
to get new articles, sometimes ok, sometimes fault, disconnect,
new connect to news server, to post articles, or connect to other news
server,
no waiting, connect crashes at once.
Facit, 8.009b waited over 30 seconds to connect to newsserver,
10b seems to wait only for one or two secs first time and if disconnect
and new connect it does wait any more and crashes at once.
Result: fetching news from "forums.inprise.com" mostly is done,
disconnecting and connecting to "news.cs.tu-berlin.de" (to get the
de-groups,
because my english is as bad), i get at once my except .. end errormessage,
but can not get news, when want to post news, the same problem.
Any ideas? (this posting is send via my old version, running still on a
other mashine,
until new version is stabil)

regards

Ernst Gerlach
ernst.gerl...@epost.de
http://www.gerlach-mtl.de
--- use plain text only in email ---

 

Re:Indy, new version, new problems (in my case with the TidNNTP)


"Ernst Gerlach" <ernst.gerl...@epost.de> schrieb im Newsbeitrag
news:925rm4$lup10@bornews.inprise.com...
Quote
> Hallo Indy team,
> .....

I have more information:
TidNNTP put on a form (to ask servers for newsgroups) brings
a exeption.
first server connect: ok, receiving newsgroups, ok,
disconnect and connect to the next server brings text:
"could not bind socket" "Adress and Port are allready in use"
--- good by ---
This exeption i could not see before, because the TidNNTP, to fetch
articles, is created in a thread and i do not fetch the exeption, i only
send a message to users, that there was a mistake.

regards and Merry Christmas and Happy New Year

Ernst Gerlach
ernst.gerl...@epost.de
http://www.gerlach-mtl.de
--- use plain text only in email ---

Re:Indy, new version, new problems (in my case with the TidNNTP)


ernst.gerl...@epost.de (Ernst Gerlach) wrote in <927ilm$p9k2
@bornews.inprise.com>:
r connect: ok, receiving newsgroups, ok,

Quote
>disconnect and connect to the next server brings text:
>"could not bind socket" "Adress and Port are allready in use"

We're already looking into this bug. For now try putting like a Sleep(1500)
after your disconnect.

The problem occurs when you disconnect and reconnect to quickly using the
same client. The other work around is to desroy and recreate the client.

--
Chad Z. Hower (Kudzu) - Church Hill, TN - Team Indy
      "Programming is an art form that fights back"
Forget the Y2K problem, Lets fix the W2K problem.
http://www.pbe.com/Kudzu/ - Free Delphi/CBuilder components and articles

Re:Indy, new version, new problems (in my case with the TidNNTP)


"Kudzu - Team Indy" <chad...@pbe.com> schrieb im Newsbeitrag
news:901589A08chadngpbecom@207.105.83.62...
Quote
> ernst.gerl...@epost.de (Ernst Gerlach) wrote in <927ilm$p9k2
> @bornews.inprise.com>:
> r connect: ok, receiving newsgroups, ok,
> >disconnect and connect to the next server brings text:
> >"could not bind socket" "Adress and Port are allready in use"

> We're already looking into this bug. For now try putting like a
Sleep(1500)
> after your disconnect.

> The problem occurs when you disconnect and reconnect to quickly using the
> same client. The other work around is to desroy and recreate the client.

Thanks for the quick reply. Thanks that you spend your time while Cristmas.
First try: sleep(2000), no help.
Second try: Free, new Create, no help.
Third try: Free, sleep(2000), new Create, no help.
I have to wait for the solution.

regards and Merry Christmas and Happy New Year

Ernst Gerlach
ernst.gerl...@epost.de
http://www.gerlach-mtl.de
--- use plain text only in email ---

Re:Indy, new version, new problems (in my case with the TidNNTP)


ernst.gerl...@epost.de (Ernst Gerlach) wrote in <928557$n9512
@bornews.inprise.com>:

Quote
>Thanks for the quick reply. Thanks that you spend your time while Cristmas.

All work and no play. :)

Quote
>First try: sleep(2000), no help.
>Second try: Free, new Create, no help.
>Third try: Free, sleep(2000), new Create, no help.
>I have to wait for the solution.

If none of those did it - it might be something in your code. Or something
thats not letting the socket properly close. It sounded kind of like the
other bug we were working on - but now Im not sure.

In TIdSocketHandle.CloseSocket, try commenting out the Shutdown call and the
error check right after it - see if that helps.

Quote

>regards and Merry Christmas and Happy New Year

Thanks. Same to you.

--
Chad Z. Hower (Kudzu) - Church Hill, TN - Team Indy
      "Programming is an art form that fights back"
Forget the Y2K problem, Lets fix the W2K problem.
http://www.pbe.com/Kudzu/ - Free Delphi/CBuilder components and articles

Re:Indy, new version, new problems (in my case with the TidNNTP)


The problem is here :

function TIdSocketHandle.Connect(const AFamily: Integer = Id_PF_INET):
Integer;

begin

  result := GStack.WSConnect(Handle, AFamily, PeerIP, PeerPort);

  UpdateBindingLocal;
  //Could Peer binding ever be other than what we specified above? Need to
reread it?

  UpdateBindingPeer;

end;

The two lines : UpdateBindingLocal and UpdateBindingPeer are the problem.

The exception that is reported fom everywhere is 10057 'Socket is ot
connected' and it occurs on the second line.

If you comment only second line new exception with code 0 is rised so I
commented these two lines and my code now works without any problems.

Doychin

doic...@5group.com

"Kudzu - Team Indy" <chad...@pbe.com> wrote in message
news:9015AD3D5chadngpbecom@207.105.83.62...

Quote
> ernst.gerl...@epost.de (Ernst Gerlach) wrote in <928557$n9512
> @bornews.inprise.com>:
> >Thanks for the quick reply. Thanks that you spend your time while
Cristmas.

> All work and no play. :)

> >First try: sleep(2000), no help.
> >Second try: Free, new Create, no help.
> >Third try: Free, sleep(2000), new Create, no help.
> >I have to wait for the solution.

> If none of those did it - it might be something in your code. Or something
> thats not letting the socket properly close. It sounded kind of like the
> other bug we were working on - but now Im not sure.

> In TIdSocketHandle.CloseSocket, try commenting out the Shutdown call and
the
> error check right after it - see if that helps.

> >regards and Merry Christmas and Happy New Year

> Thanks. Same to you.

> --
> Chad Z. Hower (Kudzu) - Church Hill, TN - Team Indy
>       "Programming is an art form that fights back"
> Forget the Y2K problem, Lets fix the W2K problem.
> http://www.pbe.com/Kudzu/ - Free Delphi/CBuilder components and articles

Re:Indy, new version, new problems (in my case with the TidNNTP)


doic...@5group.com (Doychin Bondzhev) wrote in <3a485441$1_2@dnews>:

Quote
>function TIdSocketHandle.Connect(const AFamily: Integer = Id_PF_INET):
>Integer;

Actually its not. Thats just causing it to be masked.

Change it to:
function TIdSocketHandle.Connect(const AFamily: Integer = Id_PF_INET):
Integer;
begin
        result := GStack.WSConnect(Handle, AFamily, PeerIP, PeerPort);
  if result <> Id_Socket_Error then begin
    UpdateBindingLocal;
    UpdateBindingPeer;
  end;
end;

And it wont be masked. This is the same bug as reported in two other threads.
Im working on it now.

--
Chad Z. Hower (Kudzu) - Church Hill, TN - Team Indy
      "Programming is an art form that fights back"
Forget the Y2K problem, Lets fix the W2K problem.
http://www.pbe.com/Kudzu/ - Free Delphi/CBuilder components and articles

Re:Indy, new version, new problems (in my case with the TidNNTP)


Hallo Doychin,
this is a nice christmas present. Thanks a lot. In the first view, i had to
guess, with two
lines you mean, then i readed your posting to Jan, ... it was the two
"Update...",
and now it runs fine.

Ernst Gerlach
ernst.gerl...@epost.de
http://www.gerlach-mtl.de
--- use plain text only in email ---

"Doychin Bondzhev" <doic...@5group.com> schrieb im Newsbeitrag
news:3a485441$1_2@dnews...

Quote
> The problem is here :

> function TIdSocketHandle.Connect(const AFamily: Integer = Id_PF_INET):
> Integer;

> begin

>   result := GStack.WSConnect(Handle, AFamily, PeerIP, PeerPort);

>   UpdateBindingLocal;

>   //Could Peer binding ever be other than what we specified above? Need to
> reread it?

>   UpdateBindingPeer;

> end;

> The two lines : UpdateBindingLocal and UpdateBindingPeer are the problem.

> The exception that is reported fom everywhere is 10057 'Socket is ot
> connected' and it occurs on the second line.

> If you comment only second line new exception with code 0 is rised so I
> commented these two lines and my code now works without any problems.

> Doychin

> doic...@5group.com

> "Kudzu - Team Indy" <chad...@pbe.com> wrote in message
> news:9015AD3D5chadngpbecom@207.105.83.62...
> > ernst.gerl...@epost.de (Ernst Gerlach) wrote in <928557$n9512
> > @bornews.inprise.com>:
> > >Thanks for the quick reply. Thanks that you spend your time while
> Cristmas.

> > All work and no play. :)

> > >First try: sleep(2000), no help.
> > >Second try: Free, new Create, no help.
> > >Third try: Free, sleep(2000), new Create, no help.
> > >I have to wait for the solution.

> > If none of those did it - it might be something in your code. Or
something
> > thats not letting the socket properly close. It sounded kind of like the
> > other bug we were working on - but now Im not sure.

> > In TIdSocketHandle.CloseSocket, try commenting out the Shutdown call and
> the
> > error check right after it - see if that helps.

> > >regards and Merry Christmas and Happy New Year

> > Thanks. Same to you.

> > --
> > Chad Z. Hower (Kudzu) - Church Hill, TN - Team Indy
> >       "Programming is an art form that fights back"
> > Forget the Y2K problem, Lets fix the W2K problem.
> > http://www.pbe.com/Kudzu/ - Free Delphi/CBuilder components and articles

Other Threads