#import <VVOSCQueryServer.h>
Delegates of VVOSCQueryServer must respond to this protocol. This is how the query server interfaces with your OSC address space- it passes queries to the server's delegate, which assembles a reply that the server will return.
◆ hostInfoQueryFromServer:()
This delegate callback is performed whenever a client requests the server's HOST_INFO object.
- Parameters
-
s | The server whose HOST_INFO information was queried. |
- Returns
- The returned instance should be a init'ed with a JSON object containing the HOST_INFO data you want the server to return. For more information, please consult the OSCQuery documentation.
◆ server:receivedOSCPacket:sized:()
- (void) server: |
|
(VVOSCQueryServer *) |
s |
receivedOSCPacket: |
|
(const void *) |
packet |
sized: |
|
(size_t) |
packetSize |
|
|
| |
|
required |
The OSCQuery protocol includes provisions for sending raw (binary) OSC packets over the persistent websocket connection maintained between clients and server. This delegate callback is performed whenever the server receives an OSC packet over its websocket connection. The packet data should not be assumed to exist after this method returns, and should be copied or parsed immediately.
- Parameters
-
s | The server that received the packet |
packet | A pointer to a block of memory containing the OSC packet data |
packetSize | The size of packet in bytes |
◆ server:wantsReplyForQuery:()
This delegate callback is performed whenever a client queries the server for information about the structure of its address space. You should consult the documentation for VVOSCQuery for more information about the specific information being requested.
- Parameters
-
s | The server that is being queried. |
q | The query that is being performed on the server- this consists of a path, zero or more parameters which offer cues about what kind of query is being performed on the path, and a flag indicating whether or not the query should be considered recursive. For more information, please consult the documentation for VVOSCQuery. |
- Returns
- The return instance of VVOSCQueryReply will probably be either an error of some sort (if the query was inappropriate, incomplete, invalid, etc) or a JSON object containing the information to be returned for the query. As a convenience, VVOSCQueryReply has a class method for producing fully-formed JSON objects that comply with the OSCQuery specification- these JSON objects can then be used to create a VVOSCQueryReply instance.
◆ server:wantsToIgnore:()
This delegate callback is performed when all of the clients currently connected to the server have informed the server that they no longer wish to listen to a given address using the IGNORE attribute. This delegate callback is only performed once, when all of the clients listening to the given address have either disconnected or explicitly sent IGNORE messages.
- Parameters
-
s | The server that received the IGNORE request |
address | The address that the server no longer needs to listen to. |
◆ server:wantsToListenTo:()
This delegate callback is performed when a client has informed your server that it wishes to "LISTEN" to a particular OSC address path. After receiving this message, it becomes the delegate's responsibility to pass any OSC messages sent to that address back to the server, which will take care of sending the message to the appropriate clients. This is accomplished via -[VVOSCQueryServer sendOSCPacketData:sized:toClientsListeningToOSCAddress:]. Delegates will only receive this callback once per OSC address, even if multiple clients requested to listen to it.
- Parameters
-
s | The server that received the LISTEN request |
address | The address that the client requested to LISTEN to- the delegate is now responsible for passing all OSC messages sent to that address within your software to the server. |
◆ server:websocketDeliveredJSONObject:()
- (void) server: |
|
(VVOSCQueryServer *) |
s |
websocketDeliveredJSONObject: |
|
(NSDictionary *) |
jsonObj |
|
|
| |
|
required |
This delegate callback is performed when the server receives a JSON object from one of the clients it maintains a websocket connection with that doesn't fit anything recognized from the spec. At this time, there is no known use for this callback, as it should theoretically never be executed- but if you want to use the existing websocket connection to pass data between clients and servers, this is the callback that you will want to use.
- Parameters
-
s | The server that received the JSON object. |
jsonObj | The JSON object that was passed to the server. |
The documentation for this protocol was generated from the following file: