|
|
|
@ -87,7 +87,7 @@ bc:register{
|
|
|
|
|
|
|
|
|
|
|
|
### `BaseControl:finalize([waits], [timeout])`
|
|
|
|
### `BaseControl:finalize([waits], [timeout])`
|
|
|
|
After creating a new base-controller, it will not immediately announce its data
|
|
|
|
After creating a new base-controller, it will not immediately announce its data
|
|
|
|
into the network. It will first acuumulate local nouns and verbs and then send
|
|
|
|
into the network. It will first acumulate local nouns and verbs and then send
|
|
|
|
them out in one batch. This happens when you call `finalize`.
|
|
|
|
them out in one batch. This happens when you call `finalize`.
|
|
|
|
|
|
|
|
|
|
|
|
Finalize takes two optional parameters:
|
|
|
|
Finalize takes two optional parameters:
|
|
|
|
@ -106,7 +106,7 @@ local bc = require("bc"):finalize({"some_noun"}, 10)
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
### `BaseControl:set(name, value)`
|
|
|
|
### `BaseControl:set(name, value)`
|
|
|
|
Set a noun to a new value. This only works if the noun `name` is a local one.
|
|
|
|
Set a noun or verb to a new value. This only works if `name` is local.
|
|
|
|
You can not set remote nouns. If `name` is a verb, value **must** be a function
|
|
|
|
You can not set remote nouns. If `name` is a verb, value **must** be a function
|
|
|
|
which will be the new callback.
|
|
|
|
which will be the new callback.
|
|
|
|
```lua
|
|
|
|
```lua
|
|
|
|
@ -257,5 +257,9 @@ of `filter_func` is `function(addr, msg_tbl)`, similar to the callback given to
|
|
|
|
`Network:start`. If `timeout` is not `nil`, `pull` should return after the
|
|
|
|
`Network:start`. If `timeout` is not `nil`, `pull` should return after the
|
|
|
|
timeout expired as well.
|
|
|
|
timeout expired as well.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
**Important**: When pulling on an event, the message handler given to `start`
|
|
|
|
|
|
|
|
**must** have run before pull returns! Make sure your implementation upholds
|
|
|
|
|
|
|
|
this guarantee!
|
|
|
|
|
|
|
|
|
|
|
|
### `Network:stop()`
|
|
|
|
### `Network:stop()`
|
|
|
|
Close this connection and uninstall the message handler.
|
|
|
|
Close this connection and uninstall the message handler.
|
|
|
|
|