The Newbound software starts up a few different services in order to accomplish its magic. All of the Newbound services are subclasses of the com.newbound.net.service.Service class. If you are looking for a Toaster Simple™ way to write your own lightweight TCP or UDP protocol without a bunch of third-party dependencies, you just found it! :)
At startup, the App Manager app will start up an HTTP service on the designated port (the default port is 5773). You can change this port by editing the file "Newbound/runtime/botmanager/botd.properties" in the file system.
If all you need is a quick-and-dirty webserver, just instantiate the com.newbound.net.service.http.HTTPService as follows:
new HTTPService(container, portnumber);
(You will also need to write implementations of the com.newbound.net.service.Container and com.newbound.net.service.App interfaces)
The Peer Bot app will automatically establish a peer identity and attempt to connect to the devices listed in the Newbound/runtime/peerbot/broker.txt file in the file system. By default, we preconfigure the software with default nodes so that getting started and connecting to other devices is quick and easy out-of-the-box. To prevent this behavior, just edit the Newbound/broker.txt file BEFORE launching the Newbound software for the first time.
The P2P service will pick a random available port the first time you run the software, and then use that same port every time it is launched subsequently. To change the port number, edit the Newbound/runtime/peerbot/botd.properties file in the file system.
By default, the Newbound software launches a discovery service on port 5772 in order for your device to be discovered by other peers on your local area network. To disable the discovery service, add the following line to the Newbound/runtime/botmanager/botd.properties file: