We have now sketched out a general procedure, and planned several API's to be implemented, for BlueMesh developers.
the initial phase in BlueMesh programs will be creating a BlueMesh object. Programmers will be required to choose between two different types of networks: Static and Dynamic. Static Networks lock in everyone into the network upon creation and will throw an error if anyone joins or leaves afterward. An example program that woulhd use this is a poker game. Dynamic networks handle adds and joins on the fly, and could be used for a chat room.
(The following describes the procedures required for using a dynamic network. Static network procedures will be developed later)
Next, a password, along with other options, will need to be set via a config API. Finally, A "Launch Service" API will be called, that will handle the sending and receiving of data. Both sending and receiving will be asynchronous, however data receiving will be slightly more involved. Once data is received, it will be pushed onto a queue for processing. Data will be pulled one at a time, and passed into a "handling" function that the programmer will write. Finally, a disconnect API will need to be called to handle the exiting of the application.
List of API's to be Implemented:
*Constructor (Dynamic and Static Networks will be inherited BlueMesh Classes)
*Config (Will take in password and other various options for network)
*Launch Service (Handles starting threads and managing connections)
*Send Data (Allows the sending of packets)
*Pull Data (Attempts to grab data off of processing queue, will return null if queue is
empty)
*Disconnect (Handles exiting of application, a destructor)
No comments:
Post a Comment