Hot!HTTPPrint : MLA to Harmony

Page: < 12 Showing page 2 of 2
Author
Emcy
Super Member
  • Total Posts : 533
  • Reward points : 0
  • Joined: 2008/01/09 03:37:06
  • Location: 0
  • Status: offline
Re: TCPIP_HTTP_NET_DynamicWrite : what is "needAck" parameter for ? 2018/06/28 01:03:21 (permalink)
0
Yes,
Thank
#21
Emcy
Super Member
  • Total Posts : 533
  • Reward points : 0
  • Joined: 2008/01/09 03:37:06
  • Location: 0
  • Status: offline
Re: TCPIP_HTTP_NET_DynamicWrite : what is "needAck" parameter for ? 2018/07/10 23:36:02 (permalink)
0
Note : To manage big data, you must increase value of TCPIP_HTTP_NET_DYNVAR_PROCESS_RETRIES (it is the maximum number of call of TCPIP_HTTP_NET_DynPrint() for a web page file).
#22
Emcy
Super Member
  • Total Posts : 533
  • Reward points : 0
  • Joined: 2008/01/09 03:37:06
  • Location: 0
  • Status: offline
Re: TCPIP_HTTP_NET_DynamicWrite : what is "needAck" parameter for ? 2018/07/11 00:49:43 (permalink)
0
rainad
Please use the attached files and give it a try (remove the .txt extension).
Few events have been added:
TCPIP_HTTP_NET_EVENT_OPEN
TCPIP_HTTP_NET_EVENT_CLOSE_DONE
TCPIP_HTTP_NET_EVENT_CLOSE_TIMEOUT
TCPIP_HTTP_NET_EVENT_CLOSE_POST_ERROR
TCPIP_HTTP_NET_EVENT_CLOSE_REMOTE.
Explanations are in the http_net.h but the names should be fairly clear.
Pending some further validation the changes will be added to the trunk code.
You should have all the events now to help with properly managing your resources.
Let us know if any issues with the supplied code.
 
 



Hello,
 
TCPIP_HTTP_NET_EVENT_CLOSE_DONE event doesn't operate : when I open a HTTP file, it is TCPIP_HTTP_NET_EVENT_CLOSE_TIMEOUT event which is activated. Result is my buffer is freed after the timeout and not file closure.
 
Is MPFS generator version exist which generate http_net_print.c ?
 
post edited by Emcy - 2018/07/11 01:17:13
#23
rainad
Moderator
  • Total Posts : 964
  • Reward points : 0
  • Joined: 2009/05/01 13:39:25
  • Location: 0
  • Status: online
Re: TCPIP_HTTP_NET_DynamicWrite : what is "needAck" parameter for ? 2018/07/11 15:55:19 (permalink)
0
The TCPIP_HTTP_NET_EVENT_CLOSE_DONE event refers to the connection closing, not to a file.
Since you're running HTTP_NET, which is persistent, as any server should be, especially when it implements encryption, the connections are kept open for a long time. So you won't get that event.
You should use the normal callback telling you that a particular buffer was processed and then free your buffer.
These newly added events are only for reconnects, timeouts, etc., i.e. special situations. And you'll get an TCPIP_HTTP_NET_EVENT_OPEN anyway, so you know to initialize your variables.
 
No, currently MHC does not generate http_net_print code, it needs to be done by the application. 
#24
Emcy
Super Member
  • Total Posts : 533
  • Reward points : 0
  • Joined: 2008/01/09 03:37:06
  • Location: 0
  • Status: offline
Re: TCPIP_HTTP_NET_DynamicWrite : what is "needAck" parameter for ? 2018/07/12 01:54:26 (permalink)
0
TCPIP_HTTP_NET_EVENT_OPEN event occure for each new HTTP connection or for each HTTP file opening ?
=> I think it is only for new HTTP connection
 
If there is no dynamic variable in my HTTP file, How must I do to detect end of my HTTP file (because TCPIP_HTTP_NET_DynamicWrite isn't called) ?
 
... I need to initialize a buffer when HTTP file opening (with GET or POST method) and to free it when HTTP file is closed (even si HTTP file doesn't contain a dynamic variable). I don't see how to do it.
#25
Emcy
Super Member
  • Total Posts : 533
  • Reward points : 0
  • Joined: 2008/01/09 03:37:06
  • Location: 0
  • Status: offline
Re: TCPIP_HTTP_NET_DynamicWrite : what is "needAck" parameter for ? 2018/07/12 08:42:34 (permalink)
0
I'm not sure but I think file openning can be detect with TCPIP_HTTP_NET_ConnectionFileAuthenticate and TCPIP_HTTP_NET_ConnectionUserAuthenticate
 
But I don't know how to detect closure if file doesn't contain dynamic variable
post edited by Emcy - 2018/07/12 08:56:37
#26
rainad
Moderator
  • Total Posts : 964
  • Reward points : 0
  • Joined: 2009/05/01 13:39:25
  • Location: 0
  • Status: online
Re: TCPIP_HTTP_NET_DynamicWrite : what is "needAck" parameter for ? 2018/07/12 17:12:26 (permalink)
0
The TCPIP_HTTP_NET_EVENT_OPEN refers to the connection open, not to a file.
 
IMO, if you have buffers for processing that have nothing to do with dynamic variables, then I do not understand why is important for you that a file or another have been opened/closed.
When you get the POST/GET callback, that's when you do your processing.
Probably you're talking about buffers used for something else, not for dynamic variable processing.
 
Anyway, file related events could be added, surely, to contain the name of the file that is opened or closed.
Not sure I understand the usage scenario, but I could try to add these events if you think they solve the issue for you. Let me know few details, please.
 
#27
Emcy
Super Member
  • Total Posts : 533
  • Reward points : 0
  • Joined: 2008/01/09 03:37:06
  • Location: 0
  • Status: offline
Re: TCPIP_HTTP_NET_DynamicWrite : what is "needAck" parameter for ? 2018/07/16 01:08:51 (permalink)
0
Hello Rainad,
 
My process :
1- HTTP server receive a POST : my process set a semaphore flag to indicate a POST is processing. Then, if an other POST is recieved, it wil be in waiting mode as long as semaphore = 1.
2- My process get POST informations to configure my product.
3- My process warned HTTP client if treatment went well in using dynamic variable in HTTP file. Also, product configuration is sent to HTTP client in using HTTP dynamic variables. Then, my process clear semaphore flag.
=> This process allows to be sure that product configuration request is processed one by one.
=> Also my process manages in parallel Telnet commands with the same semaphore flag with the same operating principle.
=> For GET request, semaphore isn't used (my process handles multiple GET requests at the same time) : HTTP dynamic variables are used only to indicate product configuration/status.
 
It is why I need to detect start/end of HTTP file and connection looses.
 
 
 
post edited by Emcy - 2018/07/16 01:24:09
#28
rainad
Moderator
  • Total Posts : 964
  • Reward points : 0
  • Joined: 2009/05/01 13:39:25
  • Location: 0
  • Status: online
Re: TCPIP_HTTP_NET_DynamicWrite : what is "needAck" parameter for ? 2018/07/16 11:27:15 (permalink)
0
OK, if you think this will help you solve the issue, I'll try to add the file open/close related events.
Give me few days and I'll publish the updated version here.
 
 
#29
Page: < 12 Showing page 2 of 2
Jump to:
© 2018 APG vNext Commercial Version 4.5