Could a couple more of Hollywood's network functions be made to work together with hURL?
I'm specifically thinking that it would be nice to have SSL and Adapter tags available for SendData() and ReceiveData().
hURL High-Level Interface
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: hURL High-Level Interface
I think this is already possible. Both SendData() and ReceiveData() operate on a connection established by OpenConnection() and the latter supports both SSL and Adapter tags or am I missing something here?
Re: hURL High-Level Interface
Okay, the limitation that I thought was in SendData() and ReceiveData() seems, instead, to be connected with the OnReceiveData event.
The following code works with the standard OpenConnection(), but not when the SSL=True and Adapter="hurl" tags are used:
The following code works with the standard OpenConnection(), but not when the SSL=True and Adapter="hurl" tags are used:
Code: Select all
@REQUIRE "hurl", {Link = True}
FTPServer$="192.168.1.102"
Function p_IncomingData()
DebugPrint("Data Received")
EndFunction
InstallEventHandler({OnReceiveData=p_IncomingData})
OpenConnection(1, FTPServer$, 21)
;OpenConnection(1, FTPServer$, 21, {SSL=True, Adapter="hurl"})
Repeat
WaitEvent
Forever
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: hURL High-Level Interface
Right, this is a limitation of the network adapter plugin API. I'll probably keep it that way because it shouldn't be that much of a problem to poll the data.
Re: hURL High-Level Interface
What would be the best way to poll for data to be received?
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: hURL High-Level Interface
Depends on the actual script. If you're in a WaitEvent() based script, you could install an interval function that calls ReceiveData() several times per second. Otherwise just use a loop but include a throttle like VWait() to avoid hogging the CPU.
Re: hURL High-Level Interface
I'll give it a try. Thanks for the suggestion.