Webio - An embedded web server

View: 923    Dowload: 0   Comment: 0   Post by: naruto   Category: Embedded Systems   Fields: Computers - Technology

Download  webio-an-embedded-web-server.zip (118.94 KB)

You need to Sign In to download the file webio-an-embedded-web-server.zip
If you do not have an account then Sign up for free here

Background

In 1996, I wrote one of the first web servers designed for embedded devices. In those days, most embedded devices had no file systems, so I created the "HTML compiler" to embed the files into the code image. Similarly, the lack of a file system led to C-language CGI functions.

Creating basic GUIs with this system was so easy that I started using it in Windows applications in preference to the Windows GUI. Back then, before JavaScript and CSS, it was somewhat limited - for example, it wouldn't make a very good "photo shop" type program - but for basic GUIs, it was great.

As my company started using Linux and Browser-enabled hand-held devices, a really huge advantage became obvious - my new applications worked everywhere, not just on Windows. The user was not tied on one OS or one type of device. They didn't even have to be near the machine running the application.

In 2007, I needed a similar server for an open-source project. I had left the previous company, which still retained the rights to the my old server. They wouldn't open source it, and nothing suitable was available in the public domain. I decided to create a second generation version of the server and release it under the BSD license so I would never have to write it again.

The result is Webio - my second (and hopefully last) embedded web server.

Using the code

The Windows version is probably of most interest to CodeProject readers, and so the .zip file is made available here. Follow these steps:

  1. Unzip it (preserving the directory structure).
  2. Type buildfs to compile the embedded file system.
  3. Open the project file with Visual C++ 6.0 or newer, and click Build.

You should get a little application which, when run, allows your PC to act as a web server - point a browser at it. You can do this in loopback by typing "http://127.1" in your browser's location bar.

Points of interest

Webio has a few improvements over my first embedded web server:

  • The "HTML compiler" is now a full-fledged file system builder, designed from the group up to generate not only file images in your C code, but also generate code for C-language CGI.
  • The server buffers all code-generated output, allowing accurate Content-Length fields on files with variable sized SSIs.
  • A fast path for binary files improves performance.
  • Portability across Windows/Linux/Embedded systems is enhanced.

History

  • July 2008 - First public release.
  • July 27th - Updated, call this release 1.1. Changes:
    • Added command line option to set the HTTP port (default is still 80).
    • Error message is more helpful if another web server already has port 80.
    • Fixed some typos and omissions in the manual.

Webio - An embedded web server

Webio is a small-footprint web server, designed to be embedded in an application or an embedded system. It's useful when you want to implement a complex browser based GUI (which can be accessed by everything from PCs to cell phones) in a very efficient manner. Webio compiles and runs equally well under Linux and Windows, and should be easy to port to most other platforms. It comes with a programmer's manual (progman.html) which explains how to use it and how to port it.

Posted on 20-03-2014 

Comment:

To comment you must be logged in members.

Files with category

  • Can’t Connect When Clock Wrong

    Can’t Connect When Clock Wrong

    View: 638    Download: 0   Comment: 0

    Category: Embedded Systems     Fields: Other

    Probably, the title of this post summaries it well, but there is some detail worth explanation. I was developing an Azure Function app which was basically integrating data between CRM and another system.

  • OpenTheme : An open source graphic user interface (GUI) toolkit

    OpenTheme : An open source graphic user interface (GUI) toolkit

    View: 4636    Download: 4   Comment: 0

    Category: Embedded Systems     Fields: Other

    OpenTheme is an XML based GUI toolkit with a set of foundation class and WYSIWYG editor. Although it's originally designed for full screen GUI, it is also good for Windowed user interface, with full localization support and arbitary...

  • Design State Machine Engine for embedded system development

    Design State Machine Engine for embedded system development

    View: 4265    Download: 4   Comment: 0

    Category: Embedded Systems     Fields: none

    Embedded systems are some special purpose computers that are used inside of devices. Embedded systems generally use micro controllers that contain many functions of a computer on a single device. Embedded systems have to tightly work together with...

  • The StateWizard VC++ Add-in and Engine with Source Code

    The StateWizard VC++ Add-in and Engine with Source Code

    View: 4309    Download: 0   Comment: 0

    Category: Embedded Systems     Fields: none

    In an environment where software systems are more and more complex, concurrent, and real-time oriented, the choice of modeling languages and tools becomes the success key for many projects. This article introduces a cross-platform state-oriented...

  • Template merging with NVelocity and ASP.NET

    Template merging with NVelocity and ASP.NET

    View: 3214    Download: 0   Comment: 0

    Category: Embedded Systems     Fields: Other

    If you have ever tried to implement a newsletter system or a service for communicating with website users, you have probably faced the requisite to send multiple email messages with a common template and some differences, like a personalized greeting...

  • Use PowerShell to Manage your Intel AMT Data

    Use PowerShell to Manage your Intel AMT Data

    View: 2132    Download: 0   Comment: 0

    Category: Embedded Systems     Fields: Other

    This article is in the Product Showcase section for our sponsors at CodeProject. These reviews are intended to provide you with information on products and services that we consider useful and of value to developers.

  • A C++ Embedded Web Server

    A C++ Embedded Web Server

    View: 3323    Download: 1   Comment: 0

    Category: Embedded Systems     Fields: Other

    Do you have a web page or two? Nothing fancy, perhaps, but a neat demonstration of what can be achieved with a handful of HTML tags? Do you have a sophisticated C++ Windows desktop application which now needs to be controlled and monitored remotely?...

  • Java/.NET Integration as Simple as Possible

    Java/.NET Integration as Simple as Possible

    View: 1676    Download: 2   Comment: 0

    Category: Embedded Systems     Fields: Other

    For a number of years, I have been developing software for integrating applications written in different platforms. And in my business, I face with interoperability issues: Java and C++, Java and COM, Java and .NET. To solve them, I have developed a...

 
File suggestion for you
File top downloads
Codetitle - library source code to share, download the file to the community
Copyright © 2018. All rights reserved. codetitle Develope by Vinagon .Ltd