Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 06 18:14
    rlebeau commented #183
  • Dec 06 18:00
    JPeterMugaas commented #183
  • Dec 06 17:42
    rlebeau commented #183
  • Dec 06 17:42
    rlebeau commented #183
  • Dec 06 17:41

    rlebeau on OpenSSL-1.1.x

    (compare)

  • Dec 06 17:18
    rlebeau commented #270
  • Dec 06 17:17
    jgv-Flexsys commented #183
  • Dec 06 17:10
    rlebeau commented #183
  • Dec 05 15:04
    Fulgan commented #270
  • Dec 05 13:25
    winkelsdorf commented #183
  • Dec 05 13:23
    winkelsdorf commented #183
  • Dec 03 22:30

    rlebeau on master

    Correctly define timezone funct… Merge pull request #272 from Bi… (compare)

  • Dec 03 22:30
    rlebeau closed #272
  • Dec 03 21:15

    rlebeau on master

    Fixing compiler errors in TIdIP… (compare)

  • Dec 03 20:50
    Bi0T1N opened #272
  • Dec 03 01:33

    rlebeau on master

    Fix for missing declaration of … Fix for compiler error in Local… Merge branch 'master' of https:… and 2 more (compare)

  • Dec 02 20:27

    rlebeau on master

    Update IdGlobal.pas Fix for co… (compare)

  • Dec 01 20:17

    rlebeau on master

    Update IdGlobal.pas Fix for mi… (compare)

  • Dec 01 10:46
    geoffsmith82 commented #192
  • Nov 30 16:54

    rlebeau on master

    Update IdGlobal.pas Fix for co… (compare)

phy0292
@phy0292
It is known to have problems, but disclosed function, make me an error code, so I'm so confused
@davidpn 我上面说的能看明白吗?
Remy Lebeau
@rlebeau
As I said, I'm already aware of the problem, and no, the proposed fix is not enough, there is another known issue further down in the same function. Fixing the function is on my TODO list, I just haven't gotten around to it yet
davidpn
@davidpn
@phy0292: 他说:“我已经意识到了这个问题,并没有,建议修复是不够的,还有另外一个已知问题在同一个函数进一步向下修复的功能是我的待办事项清单上,只是还没有得到周围它尚未“
davidpn
@davidpn
我理解这个问题。它需要由他来解决
Remy Lebeau
@rlebeau
I wish you guys would speak English instead. 请改为讲英语。
davidpn
@davidpn
我同意 :-)
phy0292
@phy0292
@rlebeau
Okay, look forward to your solution.
I'm really sorry, although I would a little programming, but to not speak English. Only use google translation, but google translate is not to force.
davidpn
@davidpn
Google Translate does a pretty good job :-)
phy0292
@phy0292
@davidpn I have a project that is related to the identification codes, would like to ask for help to complete, I do not know you or your friends have no interest. If you are interested, you can then go into the details, And agreed to be paid in dollars
davidpn
@davidpn
what do you mean by identification codes?
phy0292
@phy0292
For example, when we log on to a site or page, simply to enter the picture ID.
May be pure digital, it may be letters and numbers combination.
davidpn
@davidpn
Do you mean QR codes?
phy0292
@phy0292
I have completed the identification of some kind of image, but in addition there is a picture of him I could not be processed and identified.
Remy Lebeau
@rlebeau
this is not the place to solicit work from paid freelancers. Use a site like http://www.freelancer.com for that. Or just search online, there are plenty of examples and forum discussions related to how to use Indy, particularly TIdHTTP, to interact with HTTP web pages.
phy0292
@phy0292
@davidpn OCR
Remy Lebeau
@rlebeau
If you are trying to process an image, like a captcha or QR code, that is outside the realm and capabilites of Indy.
phy0292
@phy0292
Well, I just ask, try your luck, if no one is interested, I think to approach it.
davidpn
@davidpn
@phy0292 I may be interested. Please email me at davidn@radsoft.com.au if you want to discuss it
phy0292
@phy0292
ok
However, I speak English you may be difficult to understand, gradually began to feel it.
phy0292
@phy0292
@davidpn It has been sent to your mailbox.
davidpn
@davidpn
thanks
Remy Lebeau
@rlebeau
I checked in an update to IdZLib.pas
phy0292
@phy0292
Very good
phy0292
@phy0292
@rlebeau In addition to the last time I say the way,If use Z_SYNC_FLUSH instead of Z_NO_FLUSH. It can also eliminate BUG. I do not know will not reduce the compression capability.
phy0292
@phy0292
Oh, no, the second approach is wrong.
davidpn
@davidpn
@rlebeau There was a post in .winsock about IdZLib not compiling.. not sure if it's because of stuff you were were doing recently
davidpn
@davidpn
is Indy supposed to handle IPv6 "automatically"?
Remy Lebeau
@rlebeau
not "automatically", no. You need to manually set the connection's IPVersion property to Id_IPv6 (unless you recompile Indy with IdIPv6 defined in IdCompilerDefines.inc, then IPVersion will default to Id_IPv6). In the case of TIdHTTP specifically, it obtains server info from a URL instead of set properties, so if you want to connect to an HTTP/S server using IPv6, you need to wrap the host portion of the URL in brackets. RFCs 2732 and 3986 require brackets around IPv6 IP addresses only, but TIdHTTP currently requires brackets around hostnames as well if you want it to perform an IPv6 DNS lookup. Indy is currently dependant on the IPVersion property being set and is not coded to resolve a hostname to both IPv4 and IPv6 at the same time and then attempt every address reported until a connection is successful. It lookups a hostname to either IPv4 or IPv6 only and then attempts a connection to the first IP reported only.
davidpn
@davidpn
ok, is there a way of determining whether an OS supports IPv6 or do we need to use TOSVersion.Check or something?
Remy Lebeau
@rlebeau
GStack.SupportsIPv6
There is currently no GStack.SupportsIPv4, though (in work) to handle the case of IPv6-only systems.
davidpn
@davidpn
that's OK; I'm just after the scenario of where IPv6 is supported
..and thanks
davidpn
@davidpn
The reason is that iOS apps can be rejected if they use IPv4 when IPv6 is available.. I'm looking at using a local patch for IdTCPClient for my own code, but it might be worth considering as in inclusion into Indy
Remy Lebeau
@rlebeau
AFAIK, apps are only rejected if they don't support IPv6-only networks. If a network supports both IPv4 and IPv6, IPv4 is still allowed to be used even though IPv6 is available.
davidpn
@davidpn
do Indy apps switch to IPv6 if that's all that is available?
Remy Lebeau
@rlebeau
As I said before: "not automatically, no". You have to set the IPVersion property manually as needed. Unless you are using Embarcadero's copy of Indy in Seattle or Berlin (I forget which one), in which case it is precompiled to default to IPv6 on iOS.
davidpn
@davidpn
ok.. thanks
fan_tangshan
@sainimu78
blob
A bug in Indy TCP, it losses data!!!
In TIdTCPServer.OnExecute
SetLength(arrBuf, 0);
argContext.Connection.IOHandler.ReadBytes(arrBuf, -1);
OnReceive(@(arrBuf[0]), Length(arrBuf));
In the callback function OnReceive, counts the "Length(arrBuf)", the total number of bytes received. After 10000 times sending, there are about 9000~16000 bytes losed.
fan_tangshan
@sainimu78
In the client app, it sends buffers with random size
blob
Remy Lebeau
@rlebeau
ReadBytes() does not lose data (unless you are performing reads across multiple threads at the same time and corrupting the IOHandler.InputBuffer). You are asking ReadBytes() to return whatever arbitrary bytes are currently available at the time it is being called. However, when AByteCount is -1, ReadBytes() always reads from the socket first, even if there are pending bytes still in the InputBuffer. If there are no new bytes on the socket at that moment, it waits for the IOHandler's ReadTimeout to elapse before then returning whatever is in the InputBuffer. And ReadTimeout is set to infinite by default. So, if there is pending bytes in the InputBuffer, not no new bytes on the socket, ReadBytes() will not return until the next client send. You could check IOHandler.InputBufferIsEmpty() first, and if False then call IOHandler.InputBuffer.ExtractToBytes() directly, otherwise call ReadBytes() instead.
However, that is actually not necessary, because your server code is wrong to begin with. Your client is sending a data packet that has a fixed header on it that includes the data size in it. You server code is completely ignoring that header. You need to have the server read the header, then read the specified number of bytes, then you can pass the completed packet to OnReceive. Then there is no problem.
SetLength(arrBuf, 8); argContext.Connection.IOHandler.ReadBytes(arrBuf, 8); argContext.Connection.IOHandler.ReadBytes(arrBuf, PInteger(@arrBuf[4])^, True); OnReceive(@arrBuf[0], Length(arrBuf));
Remy Lebeau
@rlebeau
Note that you are sending integers in host byte order, which means you are subject to endian differences between the client and server. You really should be using network byte order instead. If you are not going to use the IOHandler's Read/Write methods for integer values, at least use Indy's GStack.HostToNetwork() function before sending the data, and the GStack.NetworkToHost() function after receiving the data, to make sure the integers are in a consistent endian on the wire.