int NetSend(char *url, int(*callback)(int event, char *response, int length));


Sends a network request to the specified URL.  The response will be handled by the callback provided.


Return Value


Returns value not used.





The URL to which to send the request.  Data to be sent to the server goes on the URL after a question mark symbol, with name / value pairs separated by ampersands, e.g.".  In  the example, you would be sending a name value of "bob" and an age value of "35" to the server for processing by "getdata".



The function that will receive the response from the server.


Callback parameters:



Indicates the result of the request.  A value of zero indicates the request failed.  A value of one indicates the request was successful.



Contains a character buffer that is the response from the server.



Indicates the length of the response buffer.




NetSend() allows you to send a request to a server and provide a callback to receive the response from the server.




Available in DragonFireSDK 1.3 and later.




#include "DragonFireSDK.h"


int MyFont;

int MyText;


int OnResponse(int event, char *response, int length)


  // Display as much of the server response as possible.

  TextSetText(MyText, response);

  return event;



void AppMain()


  // Set LandscapeMode() so we can see as much data as possible.


  // Request weather data from for my city.

  NetSend(",tx", OnResponse);

  // Set up a font and a text to display the data.

  MyFont = FontAdd("Helvetica", "Regular", 12, 0x00FF00);

  MyText = TextAdd(0, 0, "Response", MyFont);



void AppExit()





void OnTimer()