iNTERFACEWARE Products Manual > Installing and Using Chameleon > Language API Documentation > Chameleon Networking Components > LLP Component Architecture > Asynchronous Event Driven |
|
Looking for Iguana v.5 or v.6? Learn More or see the Help Center.
Communication between a client and a server over TCP/IP is considered asynchronous because it occurs at irregular intervals. A listening server, for example, has no way of determining when to expect incoming data from a connected client. Conversely, the connected client should be able to send data to a listening server and execute other operations without having to wait for a response back. Like the underlying TCP/IP protocol, the LLP components supplied with Chameleon work asynchronously, delivering events that your application has to respond to. The concept of an event-driven, asynchronous API may be familiar to developers who have experience working with Graphical User Interface (GUI) libraries - these generally work in the same manner (e.g. you never know when a user is going to click a button or select a menu item). Whenever a networking event occurs, a callback is fired into the application code to inform it. For example, if a message is received over the network, a callback like onMessageReceived(String Message) might be delivered. |