Photon Server API
Public Member Functions | List of all members
ExitGames.Messaging.Channels.Channel< T > Class Template Reference

A Concurrency.Channels.Channel<T> implementing the IChannel<T> More...

Inheritance diagram for ExitGames.Messaging.Channels.Channel< T >:
" alt="ExitGames.Concurrency.Channels.Channel< T >" shape="rect" coords="161,112,473,136"/> ExitGames.Concurrency.Channels.IChannel< T > ExitGames.Concurrency.Channels.IChannel< T > ExitGames.Concurrency.Channels.ISubscriber< T > ExitGames.Concurrency.Channels.IPublisher< T > ExitGames.Concurrency.Channels.ISubscriber< T > ExitGames.Concurrency.Channels.IPublisher< T >

Public Member Functions

bool Publish (T msg, Guid hostId)
 Publishes a message with a host id. More...
 
- Public Member Functions inherited from ExitGames.Concurrency.Channels.Channel< T >
IDisposable Subscribe (IFiber fiber, Action< T > receive)
 ISubscriber<T>.Subscribe(IFiber,Action<T>) More...
 
IDisposable SubscribeToBatch (IFiber fiber, Action< IList< T >> receive, int intervalInMs)
 ISubscriber<T>.SubscribeToBatch(IFiber,Action<IList<T>>,int) More...
 
IDisposable SubscribeToKeyedBatch< K > (IFiber fiber, Converter< T, K > keyResolver, Action< IDictionary< K, T >> receive, int intervalInMs)
 ISubscriber<T>.SubscribeToKeyedBatch<K>(IFiber,Converter<T,K>,Action<IDictionary<K,T>>,int) More...
 
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...
 
IDisposable SubscribeOnProducerThreads (IProducerThreadSubscriber< T > subscriber)
 Subscribes to actions on producer threads. Subscriber could be called from multiple threads. More...
 
bool Publish (T msg)
 IPublisher<T>.Publish(T) More...
 
void ClearSubscribers ()
 Remove all subscribers. More...
 

Additional Inherited Members

- Properties inherited from ExitGames.Concurrency.Channels.Channel< T >
bool HasSubscriptions [get]
 
int NumSubscribers [get]
 

Detailed Description

A Concurrency.Channels.Channel<T> implementing the IChannel<T>

Template Parameters
TThe message type.

Member Function Documentation

bool ExitGames.Messaging.Channels.Channel< T >.Publish ( msg,
Guid  hostId 
)
inline

Publishes a message with a host id.

Parameters
msgThe message .
hostIdThe host id is included to identify and filter received messages that were sent from the same host.
Returns
True if there is any receiver.