dofakerequest()

Top  Previous  Next

Description:

Does a request of weather data from a hard-coded zip code. The data is deleted once requested.

 

Returns:

A real value with server status information.

 

Return values:

1

Successful

-1

Error connecting

-2

Error sending request

-3

Socket error 10054 when receiving

-4

The server is confused and returned some weird value. Almost never happens but is put here anyway just in case

Any other negative number

Windows Socket error code

 

Comments:

Useful when the user needs to approve connections in their firewall (which is why I made it, my firewall took a few seconds to pop up) or if you want to check if the server is online.