Page 1 of 1

HTTP active socket number

Posted: Fri Jul 27, 2012 7:29 am
by pronem
Hi,

I am using Netburner for the first time. My need is to build a custom get and post handler routines.

Exsiting runtime library function yourgethandler( int sock, PSTR url, PSTR rxb ) needs present active HTTP socket. How do I get the needed active HTTP socket? Just wnated to see if there is a function that already exisst before I start modifying base functions.

Best Regards
Pramod

Re: HTTP active socket number

Posted: Fri Jul 27, 2012 9:26 am
by Forrest
Hello,

Your get handler is actually called by the NetBurner system code. So you don't need to pass it a active H TTP socket. To use the get handler you call the function SetNewGetHandler(handler) and pass it your custom get handler function.

To see an example of this in use, have a look at the HTML cookie example in the web directory of the examples folder.

Re: HTTP active socket number

Posted: Fri Jul 27, 2012 9:29 am
by rnixon
I think there are examples of this in the network programmers guide, and in the examples directory.