5.3.3. vlcp.protocol.jsonrpc¶
Note
This document is generated from the source file.
Created on 2015/8/12
| author: | hubo |
|---|
-
exception
vlcp.protocol.jsonrpc.JsonFormatException¶
-
class
vlcp.protocol.jsonrpc.JsonRPC¶ JSON-RPC 1.0 Protocol
-
__init__()¶ Constructor
-
closed(connection)¶ routine for connection closed
-
error(connection)¶ routine for connection error
-
init(connection)¶ routine for connection initialization
-
notificationmatcher(method, connection)¶ Create an event matcher to match specified notifications
-
parse(connection, data, laststart)¶ Parse input data into events
Parameters: - connection – connection object
- data – view for input data
- laststart – last parsed position
Returns: (events, keep) where events are parsed events to send, keep is the unused data length to be keeped for next parse.
-
querywithreply(method, params, connection, container=None, raiseonerror=True)¶ Send a JSON-RPC request and wait for the reply.
Returns: (result, error) tuple
-
reconnect_init(connection)¶ routine for reconnect
-
replymatcher(requestid, connection, iserror=None)¶ Create a matcher to match a reply
-
statematcher(connection, state='down', currentconn=True)¶ Create an event matcher to match the connection state
-
waitfornotify(method, connection, container)¶ Wait for next notification
Returns: (method, params) from the notification
-
-
class
vlcp.protocol.jsonrpc.JsonRPCConnectionStateEvent(*args, **kwargs)¶ Connection state change
-
exception
vlcp.protocol.jsonrpc.JsonRPCErrorResultException(error, result=None)¶ -
__init__(error, result=None)¶ Initialize self. See help(type(self)) for accurate signature.
-
-
class
vlcp.protocol.jsonrpc.JsonRPCNotificationEvent(*args, **kwargs)¶ Notification received from the connection
-
exception
vlcp.protocol.jsonrpc.JsonRPCProtocolException¶
-
class
vlcp.protocol.jsonrpc.JsonRPCRequestEvent(*args, **kwargs)¶ Request received from the connection
-
canignorenow()¶ Extra criteria for an event with canignore = False. When this event returns True, the event is safely ignored.
-
-
class
vlcp.protocol.jsonrpc.JsonRPCResponseEvent(*args, **kwargs)¶ Response received from the connection