nettobac  0.0.0
Network features for FreeBASIC code
example_client.bas File Reference

Example code to test nettobac package in a server scenario. More...

Include dependency graph for example_client.bas:

Go to the source code of this file.

Macros

#define FOLD
 The folder to store the data. More...
 
#define ERR_MSG
 The macro to report an error. More...
 

Functions

SUB saveData (BYREF_AS_STRING Dat, BYREF_AS_STRING Nam)
 Store data in a file. More...
 
FUNCTION_AS_INTEGER doClientActions ()
 Operate as a client, download files. More...
 
int main ()
 

Detailed Description

Example code to test nettobac package in a server scenario.

Copyright (C) GPLv3, see ReadMe.md for details.

Since
0.0.0

Definition in file example_client.bas.

Macro Definition Documentation

#define FOLD
Value:
/* "data"
*/

The folder to store the data.

Definition at line 13 of file example_client.bas.

#define ERR_MSG
Value:
/* !"\n\n" _
& LEN(res) & " bytes received --> error " & *msg _
& !"\n" & page & !" returns:" _
& !"\n\n" & res
*/

The macro to report an error.

Definition at line 16 of file example_client.bas.

Function Documentation

SUB saveData ( BYREF_AS_STRING  Dat,
BYREF_AS_STRING  Nam 
)

Store data in a file.

Parameters
Datthe data to store
Namthe path/name of the file to create (or override)

This function opens the file named Nam in the current folder for output (overriding an existend file, if any) and writes the STRING Dat in to it. The SUB gets called in order to store the downloaded data on disk.

Since
0.0.0

Definition at line 34 of file example_client.bas.

Here is the caller graph for this function:

FUNCTION_AS_INTEGER doClientActions ( )

Operate as a client, download files.

Returns
the value to END the program

FIXME

Since
0.0.0

Definition at line 53 of file example_client.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

int main ( )

Definition at line 89 of file example_client.bas.

Here is the call graph for this function: