[View] [Edit] [Lock] [References] [Attachments] [History] [Home] [Changes] [Search] [Help]
[coco8] Server in your phone
The Coco8 application includes a Server side framework, used to implement server functionality in the phone.
Server implementation samples are also included in the default image.
See entries tagged with "Server" in the Workspace list in your iPhone/iPad running Coco8.
Hello World and HTML DateTime server
This workspace expressions start simple servers (implemented by GCDWebServer class>>#startHello:; browse the class in your phone to learn more).
The expressions returns a string reporing the URL to access the server from your internal network (e.g. using your internet browser from dekstop computer).
WebSite sample
Implements a simple website exposing HTML pages from "~/Documents" folder (the root folder of Upload server).
It is implemented by (GCDWebServer class>>#runWebSite), use References tool (In your phone) to browse references to message runWebSite
Upload server
Implements a simple file upload server web interface, that let you download/upload files and folders from/to your iPhone/iPad in the Coco8 application folder.
The server expose and upload files/folders mapping the root to application's "~/Documents" folder.
Note:your files will be eliminated by iOS if you uninstall your Coco8 application.
The files are accessible (read/write) to Coco8 application (see references to String>>outputToFile: and String>>fileContents to write/read contents to/from file system).
You can load/write S8 code and frameworks to files and folders dynamically and are automatically exposed by the server.