unreal.OSCServer
¶
- class unreal.OSCServer(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
Object
C++ Source:
Plugin: OSC
Module: OSC
File: OSCServer.h
Editor Properties: (see get_editor_property/set_editor_property)
on_osc_bundle_received
(OSCReceivedBundleEvent): [Read-Write] Event that gets called when an OSC bundle is received.on_osc_message_received
(OSCReceivedMessageEvent): [Read-Write] Event that gets called when an OSC message is received.
- add_allowlisted_client(ip_address) None ¶
Adds client to allowlist of clients to listen for.
- Parameters:
ip_address (str) –
- add_whitelisted_client(ip_address: str) None ¶
deprecated: ‘add_whitelisted_client’ was renamed to ‘add_allowlisted_client’.
- bind_event_to_on_osc_address_pattern_matches_path(osc_address_pattern, event) None ¶
Adds event to dispatch when OSCAddressPattern is matched.
- Parameters:
osc_address_pattern (OSCAddress) –
event (OSCDispatchMessageEventBP) –
- clear_whitelisted_clients() None ¶
deprecated: ‘clear_whitelisted_clients’ was renamed to ‘clear_allowlisted_clients’.
- get_bound_osc_address_patterns() Array[OSCAddress] ¶
Returns set of OSCAddressPatterns currently listening for matches to dispatch.
- Return type:
- get_multicast_loopback() bool ¶
Gets whether or not to loopback if ReceiveIPAddress provided is multicast.
- Return type:
- get_port() int32 ¶
Returns the port for the server if connected.
- Return type:
int32
- get_whitelisted_clients() None ¶
deprecated: ‘get_whitelisted_clients’ was renamed to ‘get_allowlisted_clients’.
- property on_osc_bundle_received: OSCReceivedBundleEvent¶
[Read-Write] Event that gets called when an OSC bundle is received.
- Type:
- property on_osc_message_received: OSCReceivedMessageEvent¶
[Read-Write] Event that gets called when an OSC message is received.
- Type:
- remove_allowlisted_client(ip_address) None ¶
Removes allowlisted client to listen for.
- Parameters:
ip_address (str) –
- remove_whitelisted_client(ip_address: str) None ¶
deprecated: ‘remove_whitelisted_client’ was renamed to ‘remove_allowlisted_client’.
- set_address(receive_ip_address, port) bool ¶
Set the address and port of server. Fails if server is currently active.
- set_allowlist_clients_enabled(enabled) None ¶
When set to true, server will only process received messages from allowlisted clients.
- Parameters:
enabled (bool) –
- set_multicast_loopback(multicast_loopback) None ¶
Set whether or not to loopback if ReceiveIPAddress provided is multicast.
- Parameters:
multicast_loopback (bool) –
- set_tick_in_editor(tick_in_editor) None ¶
Set whether server instance can be ticked in-editor (editor only and available to blueprint for use in editor utility scripts/script actions).
- Parameters:
tick_in_editor (bool) –
- set_whitelist_clients_enabled(enabled: bool) None ¶
deprecated: ‘set_whitelist_clients_enabled’ was renamed to ‘set_allowlist_clients_enabled’.
- unbind_all_events_from_on_osc_address_pattern_matches_path(osc_address_pattern) None ¶
Removes OSCAddressPattern from sending dispatch events.
- Parameters:
osc_address_pattern (OSCAddress) –
- unbind_all_events_from_on_osc_address_pattern_matching() None ¶
Removes all events from OSCAddressPatterns to dispatch.
- unbind_event_from_on_osc_address_pattern_matches_path(osc_address_pattern, event) None ¶
Unbinds specific event from OSCAddress pattern.
- Parameters:
osc_address_pattern (OSCAddress) –
event (OSCDispatchMessageEventBP) –