nettobac: network connections (cross-platform 32/64 bit)

User projects written in or related to FreeBASIC.
Posts: 3336
Joined: Dec 06, 2009 22:27
Location: N47°, E15°

nettobac: network connections (cross-platform 32/64 bit)

Postby TJF » Nov 11, 2015 15:00


nettobac is a FreeBASIC extension to handle network connections. It is implemented in OOP (object orientated programming) as classes, designed to get included in users source code at module level. It provides features to handle network transfer similar to FB file access like

  • OPEN and CLOSE network connections
  • PUT (= send) or GET (= receive) data thereover
without further dependencies (it's based on libc).

The package is hosted at GitHub and it contains

  • the source code in folder *src/bas*

    • the nettobac classes
    • utility functions for http protocol
    • two examples for client and server usage
  • the configuration files to build the documentation in folder *doxy*
  • the documentation context in .md files in folder *src/doc*
  • CMake scripts to build several targets (ie. all, doc, doc_htm, doc_pdf)

Downloading a file over the web is as easy as

Code: Select all

#INCLUDE ONCE "nettobac.bas"
#INCLUDE ONCE "nettobac_http.bas"

VAR res = "" _
  , msg = httpLoad(res, "")
IF msg THEN ?"error: " & *msg & " failed" : END 1

' here variable res contains the web page context

Find detailed informations in the online documentation at ... /doc/html/

Have fun!

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 2 guests