These are chat archives for IndySockets/Indy

4th
May 2017
Remy Lebeau
@rlebeau
May 04 2017 00:22
@irawancepu Indy lets you do just about anything, if you put in the work for it. What EXACTLY do you need to do?
irawancepu
@irawancepu
May 04 2017 02:06
In the past time i have to visit those website in order to check port forwarding status. Now, after your help here, i will use my own program based on Indy 10.6.2.0. I already got good result using Indy. However, i still confused about what and how these website send data to my router so it can determine it's port status. I'm Mikrotik RB1100AHX@ as my router. I will try to sniff these website communication on my ports using WireShark. I will back after same evaluation on these packets. What i want? I want to do status port check my own way. So i do not depend on these website. What happened if these webs going down?
Remy Lebeau
@rlebeau
May 04 2017 02:33
@irawancepu Why not just ask the router itself what its port status is, such as with uPNP? You don't really need to use an external site unless the router has disabled uPNP. You can't simulate a remote site locally. If you are sending a request to an external site, and that site is sending requests to the public ports of your router, you will have to keep doing that, you can't access the public side of the router from the LAN side.
Jos de Bruijn
@josdebr_twitter
May 04 2017 07:42
@rlebeau the exact error message is: "ERangeError raised: Range check error". I get the error after I call "IMAPClient.Retrieve(i, Msg)", I do not have a complete call stack, because I cannot reproduce the error locally.
Sergey
@icegood
May 04 2017 10:35
Remy wrote : @icegood TIdHTTP already does disconnect in case of socket errors....
OK. But socket error might also occur while sending request, might not it?
Moreover it occurs in place where connection is checked...

I have anothe question. We have in TIdIOHandlerStack.Connected
ReadFromSource(False, 0, False);

What indy is supposed to read here? Sometimes (vary rarely) my application based on RemObjects SuperTCPServer hangs there as there is nothing to read from server.

SandroHerbst
@SandroHerbst
May 04 2017 12:46
@rlebeau Thanks for your answer, I´ve compiled the 5 packages in D2010, it was ok, but when I tried to install the 2 dcl packages, the IDE returns an error "The procedure entry point @Idstack@TIdStackLocalAddressList@GetAddress$qqri could not be located in the dynamic link library IndySystem140.bpl", do I need to remove some files from the old version?
Remy Lebeau
@rlebeau
May 04 2017 16:20
@icegood Indy uses synchronous socket I/O, so the only way to test if a socket is still "connected" is to perform I/O on it. That is what Connected() is doing when it calls ReadFromSource(). It is checking if there is any inbound data on the socket (and if so, the data is read and put in the InputBuffer for later use), using a 0ms timeout and ignoring any disconnect/timeout errors. It should not be hanging if there is no data, unless the OS itself hangs when Indy calls the socket API select() function (which has been known to happen, despite the timeout - that is an OS issue, not an Indy issue).
@SandroHerbst yes, you need to remove the old version before installling the new version. This is explained in Indy's installation notes
SandroHerbst
@SandroHerbst
May 04 2017 17:30
@rlebeau Thanks again, now it´s ok!