-
Notifications
You must be signed in to change notification settings - Fork 2
Connector
theepicsnail edited this page Mar 6, 2011
·
6 revisions
The Connector of SuperBot2 is not one of the provided core components even though it is required. This is because the Connector can take on any of limitless implementations. A couple implementations may eventually be provided in the future.
A typical connector could be a client on some protocol, or a server as well. In either instance when an event is read from the network a Connector can give that event to SuperBot2s plugins though the provided eventHandler (provided by SetEventHandler). When a plugin wants to return content to the Connector, it will come in through the HandleResponse function.
The Connector is responsible for:
- Producing events that plugins will be given.
- Consuming responses that the PluginDispatcher sends through the HandleResponse function. (Ignoring them counts as consuming)
- Providing a ResponseObject
- For more information on how these two work together read Connector ResponseObject Relationship.
- SetEventHandler(func)
- GetResponseObject()
- HandleResponse(response)
- Start()
- Stop()