🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.internet.socket
14 messages
14 total messages Started by EricM Thu, 29 Nov 2007 22:36
IdUDPServer reconnection
#593
Author: EricM
Date: Thu, 29 Nov 2007 22:36
3 lines
1090 bytes
Hi, when i use my IdUDPServer to communicate with other pc's it works just 
fine but when i set it inactive and then back to active it won't communicate 
anymore. Anyone got a clue how to get it to communicate again?
Re: IdUDPServer reconnection
#594
Author: Remy Lebeau (TeamB)
Date: Thu, 29 Nov 2007 23:26
15 lines
1450 bytes
"EricM" <buggy441@hotmail.com> wrote in message 
news:474f3f15@newsgroups.borland.com...

> Hi, when i use my IdUDPServer to communicate with other pc's it
> works just fine but when i set it inactive and then back to active it
> won't communicate anymore.

You need to be more specific.  What exactly are you doing to communicate 
from it?  How do you know it is not communicating anymore?  Are their any 
errors?  What does your actual code look like?  Are you resetting the 
Bindings collection before reactivating the server?


Gambit
Re: IdUDPServer reconnection
#598
Author: EricM
Date: Fri, 30 Nov 2007 08:47
30 lines
2129 bytes
It uses the onUDPRead event to check for incoming data, if anything
 recognizable comes in it replies/acts on it. I know it doesn't work anymore
 because it doesn't receive any data. I had no errors but when
 i put in the Reset method like you mentioned on disabling the IdUDPServer i
 get a 'no bindings specified' warning.

 The actual code is very simple, on program startup
 IdUDPServer1->Active=true; and from within the program it can be set to
 false/true by the user.


"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message 
news:474f4e8d$1@newsgroups.borland.com...
>
> "EricM" <buggy441@hotmail.com> wrote in message
> news:474f3f15@newsgroups.borland.com...
>
>> Hi, when i use my IdUDPServer to communicate with other pc's it
>> works just fine but when i set it inactive and then back to active it
>> won't communicate anymore.
>
> You need to be more specific.  What exactly are you doing to communicate
> from it?  How do you know it is not communicating anymore?  Are their any
> errors?  What does your actual code look like?  Are you resetting the
> Bindings collection before reactivating the server?
>
>
> Gambit
>
> 
Re: IdUDPServer reconnection
#600
Author: Remy Lebeau (TeamB)
Date: Fri, 30 Nov 2007 17:20
26 lines
2065 bytes
"EricM" <buggy441@hotmail.com> wrote in message 
news:474fce31$1@newsgroups.borland.com...

> It uses the onUDPRead event to check for incoming data, if
> anything recognizable comes in it replies/acts on it. I know it
> doesn't work anymore because it doesn't receive any data.

Then either it is not actually listening at all, or it is listening on a 
different IP/Port than what the client is sending to.  Have you verified 
whether any actual data is arriving on the socket?  You can use a packet 
sniffer, such as Ethereal/Wireshark, for that.

> I had no errors but when i put in the Reset method like you mentioned
> on disabling the IdUDPServer i get a 'no bindings specified' warning.

There is no Reset() method.

> The actual code is very simple, on program startup 
> IdUDPServer1->Active=true;
> and from within the program it can be set to false/true by the user.

Which version of Indy are you using?


Gambit 
Re: IdUDPServer reconnection
#601
Author: EricM
Date: Fri, 30 Nov 2007 17:42
38 lines
2248 bytes
Like i wrote before it does work on startup but when set to inactive and 
back to active it doesn't respond anymore, that is the problem.

Yes there is a Binding->Reset() method.

I use indy version 8.0.25.


"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message 
news:47504693$1@newsgroups.borland.com...
>
> "EricM" <buggy441@hotmail.com> wrote in message
> news:474fce31$1@newsgroups.borland.com...
>
>> It uses the onUDPRead event to check for incoming data, if
>> anything recognizable comes in it replies/acts on it. I know it
>> doesn't work anymore because it doesn't receive any data.
>
> Then either it is not actually listening at all, or it is listening on a
> different IP/Port than what the client is sending to.  Have you verified
> whether any actual data is arriving on the socket?  You can use a packet
> sniffer, such as Ethereal/Wireshark, for that.
>
>> I had no errors but when i put in the Reset method like you mentioned
>> on disabling the IdUDPServer i get a 'no bindings specified' warning.
>
> There is no Reset() method.
>
>> The actual code is very simple, on program startup
>> IdUDPServer1->Active=true;
>> and from within the program it can be set to false/true by the user.
>
> Which version of Indy are you using?
>
>
> Gambit
>
> 
Re: IdUDPServer reconnection
#602
Author: Remy Lebeau (TeamB)
Date: Fri, 30 Nov 2007 19:35
21 lines
1903 bytes
"EricM" <buggy441@hotmail.com> wrote in message 
news:47504bb0$1@newsgroups.borland.com...

> Yes there is a Binding->Reset() method.

That is not the type of resetting I was referring to earlier.

Calling Reset() clears the Binding's IP and Port by default (you can set the 
AResetLocal parameter to False to prevent that).  Doing so would allow the 
server to bind to a different local port when reactivated.  If that happens, 
then of course it is not going to respond to data anymore as clients would 
still be sending data to the old port.

> I use indy version 8.0.25.

That is a VERY old version of Indy that is no longer supported.  You should 
seriously consider upgrading to the latest Indy 9 or 10 snapshots.


Gambit 
Re: IdUDPServer reconnection
#603
Author: EricM
Date: Fri, 30 Nov 2007 22:25
33 lines
2187 bytes
Well, i got v10 sort of installed now... all works except the linker can't 
find the file indy.lib, that's not weird; it's not even on my computer. 
Where did i took a wrong turn?


"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message 
news:4750663a$1@newsgroups.borland.com...
>
> "EricM" <buggy441@hotmail.com> wrote in message
> news:47504bb0$1@newsgroups.borland.com...
>
>> Yes there is a Binding->Reset() method.
>
> That is not the type of resetting I was referring to earlier.
>
> Calling Reset() clears the Binding's IP and Port by default (you can set 
> the
> AResetLocal parameter to False to prevent that).  Doing so would allow the
> server to bind to a different local port when reactivated.  If that 
> happens,
> then of course it is not going to respond to data anymore as clients would
> still be sending data to the old port.
>
>> I use indy version 8.0.25.
>
> That is a VERY old version of Indy that is no longer supported.  You 
> should
> seriously consider upgrading to the latest Indy 9 or 10 snapshots.
>
>
> Gambit
>
> 
Re: IdUDPServer reconnection
#604
Author: Remy Lebeau (TeamB)
Date: Fri, 30 Nov 2007 23:17
14 lines
1607 bytes
"EricM" <buggy441@hotmail.com> wrote in message 
news:47508de9$1@newsgroups.borland.com...

> Well, i got v10 sort of installed now... all works except
> the linker can't find the file indy.lib

Your project is still referencing Indy 8.  Edit the .bpr file to remove 
"indy.lib".  It should be referencing "IndySystemXX.lib", "IndyCoreXX.lib", 
and "IndyProtocolsXX.lib" instead, where "XX" is your version of BCB ("50" 
for BCB 5, "60" for BCB 6, etc).


Gambit 
Re: IdUDPServer reconnection
#606
Author: EricM
Date: Sat, 01 Dec 2007 00:44
23 lines
2109 bytes
Thanks! That works for now. I seem to have a strange error now 'Property and 
method IdUDPServer1UDPRead are not compatible. When i put a new idudpserver 
on a form it says that too when i doubleclick the onread event. Is there 
more i gotta remove ?


"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message 
news:47509a66$1@newsgroups.borland.com...
>
> "EricM" <buggy441@hotmail.com> wrote in message 
> news:47508de9$1@newsgroups.borland.com...
>
>> Well, i got v10 sort of installed now... all works except
>> the linker can't find the file indy.lib
>
> Your project is still referencing Indy 8.  Edit the .bpr file to remove 
> "indy.lib".  It should be referencing "IndySystemXX.lib", 
> "IndyCoreXX.lib", and "IndyProtocolsXX.lib" instead, where "XX" is your 
> version of BCB ("50" for BCB 5, "60" for BCB 6, etc).
>
>
> Gambit
> 
Re: IdUDPServer reconnection
#605
Author: Remy Lebeau (TeamB)
Date: Sat, 01 Dec 2007 00:48
12 lines
1641 bytes
"EricM" <buggy441@hotmail.com> wrote in message 
news:4750ae6c@newsgroups.borland.com...

> I seem to have a strange error now 'Property and method
> IdUDPServer1UDPRead are not compatible.

The OnUDPRead has a different signature in Indy 10 than it did in Indy 8. 
you need to update your code accordingly.


Gambit 
Re: IdUDPServer reconnection
#607
Author: Remy Lebeau (TeamB)
Date: Sat, 01 Dec 2007 00:49
11 lines
1613 bytes
"EricM" <buggy441@hotmail.com> wrote in message 
news:4750ae6c@newsgroups.borland.com...

> When i put a new idudpserver on a form it says that too when
> i doubleclick the onread event. Is there more i gotta remove ?

Did you remove all of the old Indy 8 files from your machine?


Gambit 
Re: IdUDPServer reconnection
#608
Author: EricM
Date: Sat, 01 Dec 2007 02:55
21 lines
1900 bytes
I followed the instructions for installing v10, i checked my sys-dir and bcb 
dirs but i don't see any other old indy files.
Don't know if this matters but when i run the install batch i get some .rsp 
not found messages.


"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message 
news:4750afdf$1@newsgroups.borland.com...
>
> "EricM" <buggy441@hotmail.com> wrote in message
> news:4750ae6c@newsgroups.borland.com...
>
>> When i put a new idudpserver on a form it says that too when
>> i doubleclick the onread event. Is there more i gotta remove ?
>
> Did you remove all of the old Indy 8 files from your machine?
>
>
> Gambit
>
> 
Re: IdUDPServer reconnection
#609
Author: EricM
Date: Sat, 01 Dec 2007 11:32
22 lines
2033 bytes
Ok, after moving the bpl files in the C6 dir to project-bpl i got rid of the 
bcb-startup message that i couldn't find some bpl's, i found out that i had 
to edit some existing projects to get them to compile, the UDP-onread event 
has different parameters than the old indy. I do miss some integrated help 
now though, i don't see any help files included...


"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message 
news:4750afdf$1@newsgroups.borland.com...
>
> "EricM" <buggy441@hotmail.com> wrote in message
> news:4750ae6c@newsgroups.borland.com...
>
>> When i put a new idudpserver on a form it says that too when
>> i doubleclick the onread event. Is there more i gotta remove ?
>
> Did you remove all of the old Indy 8 files from your machine?
>
>
> Gambit
>
> 
Re: IdUDPServer reconnection
#610
Author: EricM
Date: Tue, 04 Dec 2007 02:06
18 lines
1757 bytes
So i'm back to v8.0.25, it has help, it works.


"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message 
news:4750afdf$1@newsgroups.borland.com...
>
> "EricM" <buggy441@hotmail.com> wrote in message
> news:4750ae6c@newsgroups.borland.com...
>
>> When i put a new idudpserver on a form it says that too when
>> i doubleclick the onread event. Is there more i gotta remove ?
>
> Did you remove all of the old Indy 8 files from your machine?
>
>
> Gambit
>
> 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads