Trees | Indices | Help |
---|
|
Concrete class remote.Source
This Plan subclass may be used to relay JoyApp events (including all pygame events) to a remote.Sink running in another JoyApp via UDP. This allows a controller in one JoyApp to control a client in a remote JoyApp connected via an IP network, potentially running on another host altogether.
Events are serialized into a JSON string and sent over separate UDP packets. TIMEREVENTS are ignored.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from Inherited from |
|
|||
DEFAULT_SINK = 'localhost', DEFAULT_PORT
|
|
|||
Inherited from |
|
Attributes: dst -- 2-tuple -- destination address for packets, in socket library format sock -- socket / None -- socket only exists while plan is running
|
(default) Override this method to perform operations when Plan starts but before the first events are processed.
|
(default) Override this method to perform operations when Plan terminates.
|
Set the sink address. Will take effect immediately |
Send a dictionary to the remote sink; will appear in its misc message queue unless it has the key "type", in which case the sink will try to convert it to a JoyApp event. WARNING: if you use "type" inappropriately, the sink will error out and stop running |
(default) Event handler. Override this method to handle all events that were push()-ed to this Plan. The sequential behavior() in this plan only runs if onEvent returned True. All Plan-s recieve a copy of all TIMEREVENT events. If your sequential code does not need any other events, and just wants to execute in parallel with other Plan-s, it is safe to leave the default onEvent method, which always returns True NOTE: onEvent MUST return True or False. Other values raise an exception at runtime.
|
Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Thu Jan 4 16:46:17 2018 | http://epydoc.sourceforge.net |