Photon Server API
Public Member Functions | Properties | List of all members
Photon.Hive.Tests.Disconnected.DummyPeer Class Reference

The network peer dummy. More...

Inheritance diagram for Photon.Hive.Tests.Disconnected.DummyPeer:

Public Member Functions

 DummyPeer (IRpcProtocol protocol)
 Initializes a new instance of the DummyPeer class. More...
 
 DummyPeer ()
 Initializes a new instance of the DummyPeer class. More...
 
List< EventDataGetEventList ()
 The get event list. More...
 
int GetEventListCount ()
 The get event list count. More...
 
List< OperationResponseGetResponseList ()
 The get response list. More...
 
int GetResponseListCount ()
 The get response list count. More...
 
void OnDisconnect ()
 The on disconnect. More...
 
byte[] SerializeEventData (EventData eventData)
 The serialize event. More...
 
byte[] SerializeInitRequest (string applicationId, short invocationId)
 The serialize init request. More...
 
byte[] SerializeInitResponse ()
 The serialize init response. More...
 
byte[] SerializeInitResponse (short invocationId)
 The serialize init response. More...
 
byte[] SerializeOperationRequest (OperationRequest operationRequest)
 The serialize operation request. More...
 
byte[] SerializeOperationResponse (OperationResponse operationResponse)
 The serialize operation response. More...
 
bool TryConvertOperationParameter (ObjectMemberInfo< DataMemberAttribute > paramterInfo, ref object value)
 The try convert operation parameter. More...
 
bool TryParseEventData (byte[] data, Reliability reliability, byte channelId, out EventData eventData)
 The try parse event data. More...
 
bool TryParseInitRequest (byte[] data)
 The try parse init request. More...
 
bool TryParseInitRequest (byte[] data, out short invocationId)
 The try parse init request. More...
 
bool TryParseInitResponse (byte[] data)
 The try parse init response. More...
 
bool TryParseOperationRequest (byte[] data, Reliability reliability, byte channelId, out OperationRequest operationRequest)
 The try parse operation request. More...
 
bool TryParseOperationResponse (byte[] data, Reliability reliability, byte channelId, out OperationResponse operationResponse)
 The try parse operation response. More...
 
bool WaitForNextEvent (int timeout)
 The wait for next event. More...
 
bool WaitForNextEvents (int eventCount, int timeout)
 The wait for next events. More...
 
void AssertWaitForNextEvents (int eventCount, int timeout)
 Asserts receiving given events count within given timeout. More...
 
bool WaitForNextResponse (int timeout)
 The wait for next response. More...
 
void SetDebugString (string debugString)
 
void GetStats (out int rtt, out int rttVariance, out int numFailures)
 
int GetLastTouched ()
 
void DisconnectClient ()
 The disconnect client. More...
 
void AbortClient ()
 
string GetLocalIP ()
 Gets the local port. More...
 
void Flush ()
 Does nothing. More...
 
int GetConnectionID ()
 Gets the connection id. More...
 
ushort GetLocalPort ()
 The get local port. More...
 
string GetRemoteIP ()
 The get remote ip. More...
 
ushort GetRemotePort ()
 Gets the remote port. More...
 
object GetUserData ()
 Gets the user data object. More...
 
ListenerType GetListenerType ()
 Gets the ListenerType. More...
 
PeerType GetPeerType ()
 Gets the peer type. More...
 
SendResults Send (byte[] data, MessageReliablity reliability, byte channelId, MessageContentType messageContentType)
 The send. More...
 
void SetUserData (object userDataObject)
 Sets the user data object. More...
 

Properties

IRpcProtocol Protocol [get]
 Gets Protocol. More...
 
string SessionId [get, set]
 Gets or sets SessionId. More...
 

Detailed Description

The network peer dummy.

Constructor & Destructor Documentation

Photon.Hive.Tests.Disconnected.DummyPeer.DummyPeer ( IRpcProtocol  protocol)
inline

Initializes a new instance of the DummyPeer class.

Parameters
protocolThe protocol.
Photon.Hive.Tests.Disconnected.DummyPeer.DummyPeer ( )
inline

Initializes a new instance of the DummyPeer class.

Member Function Documentation

void Photon.Hive.Tests.Disconnected.DummyPeer.AbortClient ( )
inline
void Photon.Hive.Tests.Disconnected.DummyPeer.AssertWaitForNextEvents ( int  eventCount,
int  timeout 
)
inline

Asserts receiving given events count within given timeout.

Parameters
timeoutThe timeout.
eventCountThe events count.
Returns
true if all events received.
void Photon.Hive.Tests.Disconnected.DummyPeer.DisconnectClient ( )
inline

The disconnect client.

void Photon.Hive.Tests.Disconnected.DummyPeer.Flush ( )
inline

Does nothing.

int Photon.Hive.Tests.Disconnected.DummyPeer.GetConnectionID ( )
inline

Gets the connection id.

Returns
The connection id.
List<EventData> Photon.Hive.Tests.Disconnected.DummyPeer.GetEventList ( )
inline

The get event list.

Returns
the event list
int Photon.Hive.Tests.Disconnected.DummyPeer.GetEventListCount ( )
inline

The get event list count.

Returns
the event list count
int Photon.Hive.Tests.Disconnected.DummyPeer.GetLastTouched ( )
inline
ListenerType Photon.Hive.Tests.Disconnected.DummyPeer.GetListenerType ( )
inline

Gets the ListenerType.

Returns
Value ListenerType.TCPListener.
string Photon.Hive.Tests.Disconnected.DummyPeer.GetLocalIP ( )
inline

Gets the local port.

Returns
The localhost IP.
ushort Photon.Hive.Tests.Disconnected.DummyPeer.GetLocalPort ( )
inline

The get local port.

Returns
Always Zero.
PeerType Photon.Hive.Tests.Disconnected.DummyPeer.GetPeerType ( )
inline

Gets the peer type.

Returns
Value PeerType.TCPPeer.
string Photon.Hive.Tests.Disconnected.DummyPeer.GetRemoteIP ( )
inline

The get remote ip.

Returns
empty sring.
ushort Photon.Hive.Tests.Disconnected.DummyPeer.GetRemotePort ( )
inline

Gets the remote port.

Returns
Always zero.
List<OperationResponse> Photon.Hive.Tests.Disconnected.DummyPeer.GetResponseList ( )
inline

The get response list.

Returns
the response list
int Photon.Hive.Tests.Disconnected.DummyPeer.GetResponseListCount ( )
inline

The get response list count.

Returns
the response list count
void Photon.Hive.Tests.Disconnected.DummyPeer.GetStats ( out int  rtt,
out int  rttVariance,
out int  numFailures 
)
inline
object Photon.Hive.Tests.Disconnected.DummyPeer.GetUserData ( )
inline

Gets the user data object.

Returns
The user data object;
void Photon.Hive.Tests.Disconnected.DummyPeer.OnDisconnect ( )
inline

The on disconnect.

SendResults Photon.Hive.Tests.Disconnected.DummyPeer.Send ( byte[]  data,
MessageReliablity  reliability,
byte  channelId,
MessageContentType  messageContentType 
)
inline

The send.

Parameters
dataThe data.
reliabilityThe reliability.
channelIdThe channel id.
messageContentTypeThe message content type.
Returns
Always Ok.
byte [] Photon.Hive.Tests.Disconnected.DummyPeer.SerializeEventData ( EventData  eventData)
inline

The serialize event.

Parameters
eventDataThe event data.
Returns
0 bytes
byte [] Photon.Hive.Tests.Disconnected.DummyPeer.SerializeInitRequest ( string  applicationId,
short  invocationId 
)
inline

The serialize init request.

Parameters
applicationIdThe application id.
invocationIdThe invocation id.
Returns
0 bytes
byte [] Photon.Hive.Tests.Disconnected.DummyPeer.SerializeInitResponse ( )
inline

The serialize init response.

Returns
0 bytes
byte [] Photon.Hive.Tests.Disconnected.DummyPeer.SerializeInitResponse ( short  invocationId)
inline

The serialize init response.

Parameters
invocationIdThe invocation id.
Returns
0 bytes
byte [] Photon.Hive.Tests.Disconnected.DummyPeer.SerializeOperationRequest ( OperationRequest  operationRequest)
inline

The serialize operation request.

Parameters
operationRequestThe operation request.
Returns
0 bytes
byte [] Photon.Hive.Tests.Disconnected.DummyPeer.SerializeOperationResponse ( OperationResponse  operationResponse)
inline

The serialize operation response.

Parameters
operationResponseThe operation response.
Returns
0 bytes
void Photon.Hive.Tests.Disconnected.DummyPeer.SetDebugString ( string  debugString)
inline
void Photon.Hive.Tests.Disconnected.DummyPeer.SetUserData ( object  userDataObject)
inline

Sets the user data object.

Parameters
userDataObjectThe user data object.
bool Photon.Hive.Tests.Disconnected.DummyPeer.TryConvertOperationParameter ( ObjectMemberInfo< DataMemberAttribute paramterInfo,
ref object  value 
)
inline

The try convert operation parameter.

Parameters
paramterInfoThe paramter info.
valueThe value.
Returns
Always true.
bool Photon.Hive.Tests.Disconnected.DummyPeer.TryParseEventData ( byte[]  data,
Reliability  reliability,
byte  channelId,
out EventData  eventData 
)
inline

The try parse event data.

Parameters
dataThe data.
reliabilityThe reliability.
channelIdThe channel id.
eventDataThe event data.
Returns
Always false.
bool Photon.Hive.Tests.Disconnected.DummyPeer.TryParseInitRequest ( byte[]  data)
inline

The try parse init request.

Parameters
dataThe data.
Returns
An exception.
Exceptions
NotSupportedExceptionThis method is not supported.
bool Photon.Hive.Tests.Disconnected.DummyPeer.TryParseInitRequest ( byte[]  data,
out short  invocationId 
)
inline

The try parse init request.

Parameters
dataThe data.
invocationIdThe invocation id.
Returns
Always false.
bool Photon.Hive.Tests.Disconnected.DummyPeer.TryParseInitResponse ( byte[]  data)
inline

The try parse init response.

Parameters
dataThe data.
Returns
Always false.
bool Photon.Hive.Tests.Disconnected.DummyPeer.TryParseOperationRequest ( byte[]  data,
Reliability  reliability,
byte  channelId,
out OperationRequest  operationRequest 
)
inline

The try parse operation request.

Parameters
dataThe data.
reliabilityThe reliability.
channelIdThe channel id.
operationRequestThe operation request.
Returns
An exception.
Exceptions
NotSupportedExceptionThis method is not supported.
bool Photon.Hive.Tests.Disconnected.DummyPeer.TryParseOperationResponse ( byte[]  data,
Reliability  reliability,
byte  channelId,
out OperationResponse  operationResponse 
)
inline

The try parse operation response.

Parameters
dataThe data.
reliabilityThe reliability.
channelIdThe channel id.
operationResponseThe operation response.
Returns
An exception.
Exceptions
NotSupportedExceptionThis method is not supported.
bool Photon.Hive.Tests.Disconnected.DummyPeer.WaitForNextEvent ( int  timeout)
inline

The wait for next event.

Parameters
timeoutThe timeout.
Returns
true if event received.
bool Photon.Hive.Tests.Disconnected.DummyPeer.WaitForNextEvents ( int  eventCount,
int  timeout 
)
inline

The wait for next events.

Parameters
timeoutThe timeout.
eventCountThe events count.
Returns
true if all events received.
bool Photon.Hive.Tests.Disconnected.DummyPeer.WaitForNextResponse ( int  timeout)
inline

The wait for next response.

Parameters
timeoutThe timeout.
Returns
true if response received

Property Documentation

IRpcProtocol Photon.Hive.Tests.Disconnected.DummyPeer.Protocol
get

Gets Protocol.

string Photon.Hive.Tests.Disconnected.DummyPeer.SessionId
getset

Gets or sets SessionId.