Photon Server API
Public Member Functions | List of all members
ExitGames.Concurrency.Channels.IChannel< T > Interface Template Reference

A channel provides a conduit for messages. It provides methods for publishing and subscribing to messages. The class is thread safe. More...

Inheritance diagram for ExitGames.Concurrency.Channels.IChannel< T >:
ExitGames.Concurrency.Channels.ISubscriber< T > ExitGames.Concurrency.Channels.IPublisher< T > " alt="ExitGames.Concurrency.Channels.Channel< T >" shape="rect" coords="178,112,524,136"/> ExitGames.Messaging.Channels.Channel< T > ExitGames.Messaging.Channels.IChannel< T > ExitGames.Messaging.Channels.TopicPublishChannel< T > ExitGames.Messaging.Channels.Channel< T > Photon.SocketServer.Concurrency.MessageChannel< T > ExitGames.Messaging.Channels.TopicChannel< T >

Public Member Functions

IDisposable SubscribeOnProducerThreads (IProducerThreadSubscriber< T > subscriber)
 Subscribes to actions on producer threads. Subscriber could be called from multiple threads. More...
 
- Public Member Functions inherited from ExitGames.Concurrency.Channels.ISubscriber< T >
IDisposable Subscribe (IFiber fiber, Action< T > receive)
 Subscribe to messages on this channel. The provided action will be invoked via a Action on the provided executor. /summary> param name="fiber">the target executor to receive the messageparam name="receive">returns>Unsubscriber object More...
 
IDisposable SubscribeToBatch (IFiber fiber, Action< IList< T >> receive, int intervalInMs)
 Subscribes to actions on the channel in batch form. The events will be batched if the consumer is unable to process the events faster than the arrival rate. More...
 
IDisposable SubscribeToKeyedBatch< K > (IFiber fiber, Converter< T, K > keyResolver, Action< IDictionary< K, T >> receive, int intervalInMs)
 
IDisposable SubscribeToLast (IFiber fiber, Action< T > receive, int intervalInMs)
 Subscription that delivers the latest message to the consuming thread. If a newer message arrives before the consuming thread has a chance to process the message, the pending message is replaced by the newer message. The old message is discarded. More...
 
void ClearSubscribers ()
 Removes all subscribers. More...
 
- Public Member Functions inherited from ExitGames.Concurrency.Channels.IPublisher< T >
bool Publish (T msg)
 Publish a message to all subscribers. Returns true if any subscribers are registered. More...
 

Detailed Description

A channel provides a conduit for messages. It provides methods for publishing and subscribing to messages. The class is thread safe.

Template Parameters
T

Member Function Documentation

IDisposable ExitGames.Concurrency.Channels.IChannel< T >.SubscribeOnProducerThreads ( IProducerThreadSubscriber< T >  subscriber)

Subscribes to actions on producer threads. Subscriber could be called from multiple threads.

Parameters
subscriber
Returns

Implemented in ExitGames.Messaging.Channels.TopicPublishChannel< T >, and ExitGames.Concurrency.Channels.Channel< T >.