WebSockets: implement a JavaScript object-oriented client API
Replace previous callback based basic client with an easier to use object-oriented API that further abstracts the low level details of the WebSockets Server surface messaging protocol. All built-in web surface demos were updated to use the new API.
This commit is contained in:
committed by
Robin Gareus
parent
5296ed141f
commit
ae4df127ad
@@ -55,11 +55,6 @@ WebsocketsDispatcher::dispatch (Client client, const NodeStateMessage& msg)
|
||||
void
|
||||
WebsocketsDispatcher::update_all_nodes (Client client)
|
||||
{
|
||||
update (client, Node::tempo, globals ().tempo ());
|
||||
update (client, Node::position_time, globals ().position_time ());
|
||||
update (client, Node::transport_roll, globals ().transport_roll ());
|
||||
update (client, Node::record_state, globals ().record_state ());
|
||||
|
||||
for (uint32_t strip_n = 0; strip_n < strips ().strip_count (); ++strip_n) {
|
||||
boost::shared_ptr<Stripable> strip = strips ().nth_strip (strip_n);
|
||||
|
||||
@@ -140,6 +135,11 @@ WebsocketsDispatcher::update_all_nodes (Client client)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
update (client, Node::tempo, globals ().tempo ());
|
||||
update (client, Node::position_time, globals ().position_time ());
|
||||
update (client, Node::transport_roll, globals ().transport_roll ());
|
||||
update (client, Node::record_state, globals ().record_state ());
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user