BMXNET 4.0 Developer API
Assembly: BMXNET40 (in BMXNET40.dll)
Syntax
C# | Visual Basic | Visual C++ |
public interface RemoteEventService
Public Interface RemoteEventService
public interface class RemoteEventService
Members
All Members | Properties | Methods | Events |
Public Protected | Instance Static | Declared Inherited | XNA Framework Only .NET Compact Framework Only |
Member | Description | |
---|---|---|
EventPollingInterval |
The number of milliseconds (ms) to wait before polling. If a polling event is currently being processed
when a second event is trigger, the second event is skipped. It's recommended to keep this interval at
5000 (5 seconds) or higher.
| |
InvokedControl |
Set InvokedControl to a form or control of your WinForm application or EHR/VueCentric component that
will live the lifetime of your RemoteSession. The RemoteEventServices will Invoke() on the InvokedControl
to ensure all events are triggered on the UI thread.
| |
IsEventPollingEnabled |
EventPolling is used for RemoteService events and Async RPC calls. IsEventPollingEnabled is used
to turn polling on and off: True for on and False for off. The Async RPC framework and remote event service
needs polling to be turned on.
| |
RpmsEvent |
This event is triggered when an event named anEventType is published and the
receiver has a subscription. Remember that this event is not on the UI-thread unless InvokedControl is properly set.
| |
Subscribe(String) |
Subscribe to an event named anEventType. These events are trigger exclusivley by other BMXNet remote services and
travel from client-to-server-to-client. Once subscribed, the RemoteSession will poll based on the EventPollingInterval to
see if a server-side event is waiting to be triggered on the client.
| |
TimerEvent |
This event is triggered every time the event timer is triggered, based on the EventPollingInterval.
Remember that this event is not on the UI-thread unless InvokedControl is properly set.
| |
TriggerEvent(String, String, Boolean) |
Access to a RemoteEventService also allows you to publish your own events. Publishing is done through design and
documentation to notify other developers what events you will trigger. An event is published, or triggered, by using TriggerEvent
with the name of the event, an optional event specific string with data, and whether or not the publisher, if subsubscribed,
wants the event published to them.
| |
Unsubscribe(String) |
Unsubscribe from an event named anEventType. Once unsubscribed, published events named anEventType will no longer
trigger an event for this RemoteSession.
|
Remarks
By default remote events are asynchronous and are not on the UI thread. The development must handed the events propertly and if interacting with a user interface control must use Invoke(). As a convinenence, InvokedControl can be set to any non-disposed Control and the event service is use Invoke() so that the event is triggered on the UI thread
The Event timer, IsEventPollingEnabled and EventPollingInterval, is used by the Async RPC calls and is automattically turned on with IsEventPollingEnabled. If the developer turns on polling or changes the EventPollingInterval to be a long period, then the Async RPC calls will not respond in a timely manner if at all.