HTTP active socket number

Discussion to talk about software related topics only.
Post Reply
pronem
Posts: 2
Joined: Fri Jul 27, 2012 7:18 am

HTTP active socket number

Post 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
User avatar
Forrest
Posts: 288
Joined: Wed Apr 23, 2008 10:05 am

Re: HTTP active socket number

Post 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.
Forrest Stanley
Project Engineer
NetBurner, Inc

NetBurner Learn Articles: http://www.netburner.com/learn
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Re: HTTP active socket number

Post by rnixon »

I think there are examples of this in the network programmers guide, and in the examples directory.
Post Reply