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

A factor for TopicChannel<T>s. More...

Inheritance diagram for ExitGames.Messaging.Channels.TopicChannelFactory< T >:

Public Member Functions

 TopicChannelFactory (IMessageSerializer< T > serializer, ISocketSender sender, ISocketReceiver receiver)
 Initializes a new instance of the TopicChannelFactory<T> class. More...
 
 TopicChannelFactory (IMessageSerializer< T > serializer, ISocketSender sender, ISocketReceiver receiver, Guid?hostId)
 
 TopicChannelFactory (IMessageSerializer< T > serializer, string ip, int port)
 Initializes a new instance of the TopicChannelFactory<T> class. More...
 
 TopicChannelFactory (IMessageSerializer< T > serializer, string ip, int port, string bindInterface)
 Initializes a new instance of the TopicChannelFactory<T> class. More...
 
 TopicChannelFactory (IMessageSerializer< T > serializer, string ip, int port, string bindInterface, Guid?hostId)
 
bool Exists (string topic, out Concurrency.Channels.IChannel< T > value)
 Checks whether a Concurrency.Channels.IChannel<T> for a topic exists. More...
 

Protected Member Functions

override TopicChannel< T > CreateItem (string topic)
 Create a TopicChannel<T> that wraps a Concurrency.Channels.Channel<T>. More...
 
override void Dispose (bool disposing)
 Disposes the socket sender and receiver. More...
 
override void DisposeItem (string topic, TopicChannel< T > value)
 Dispose a TopicChannel<T>. More...
 

Properties

Guid HostId [get]
 Gets the local host id. This id is used to filter messages received from the local host. More...
 
IMessageSerializer< T > MessageSerializer [get]
 Gets the message de-/serializer. More...
 
TopicMessageReceiver TopicSubscriber [get]
 

Detailed Description

A factor for TopicChannel<T>s.

Template Parameters
TThe message type.

All instance members are thread safe.

Constructor & Destructor Documentation

Initializes a new instance of the TopicChannelFactory<T> class.

Parameters
serializerA thread safe message serializer.
senderA socket sender.
receiverA socket receiver.
ExitGames.Messaging.Channels.TopicChannelFactory< T >.TopicChannelFactory ( IMessageSerializer< T >  serializer,
ISocketSender  sender,
ISocketReceiver  receiver,
Guid?  hostId 
)
inline
ExitGames.Messaging.Channels.TopicChannelFactory< T >.TopicChannelFactory ( IMessageSerializer< T >  serializer,
string  ip,
int  port 
)
inline

Initializes a new instance of the TopicChannelFactory<T> class.

Parameters
serializerA thread safe message serializer.
ipA multicast IP.
portA multicast port.
ExitGames.Messaging.Channels.TopicChannelFactory< T >.TopicChannelFactory ( IMessageSerializer< T >  serializer,
string  ip,
int  port,
string  bindInterface 
)
inline

Initializes a new instance of the TopicChannelFactory<T> class.

Parameters
serializerA thread safe message serializer.
ipA multicast IP.
portA multicast port.
bindInterfaceAn interface to bind to. It is important that multicast receiver and sender bind to interfaces in the same subnet.
ExitGames.Messaging.Channels.TopicChannelFactory< T >.TopicChannelFactory ( IMessageSerializer< T >  serializer,
string  ip,
int  port,
string  bindInterface,
Guid?  hostId 
)
inline

Member Function Documentation

override TopicChannel<T> ExitGames.Messaging.Channels.TopicChannelFactory< T >.CreateItem ( string  topic)
inlineprotected

Create a TopicChannel<T> that wraps a Concurrency.Channels.Channel<T>.

Parameters
topicThe topic.
Returns
A new TopicChannel<T>.
override void ExitGames.Messaging.Channels.TopicChannelFactory< T >.Dispose ( bool  disposing)
inlineprotected

Disposes the socket sender and receiver.

Parameters
disposingThe disposing.
override void ExitGames.Messaging.Channels.TopicChannelFactory< T >.DisposeItem ( string  topic,
TopicChannel< T >  value 
)
inlineprotected

Dispose a TopicChannel<T>.

Parameters
topicThe topic.
valueThe channel.
bool ExitGames.Messaging.Channels.TopicChannelFactory< T >.Exists ( string  topic,
out Concurrency.Channels.IChannel< T >  value 
)
inline

Checks whether a Concurrency.Channels.IChannel<T> for a topic exists.

Parameters
topicThe topic.
valueThe return value.
Returns
True if a Concurrency.Channels.IChannel<T> for the given topic was returned.

Property Documentation

Gets the local host id. This id is used to filter messages received from the local host.

Gets the message de-/serializer.