Photon Server API
Public Member Functions | Public Attributes | List of all members
ExitGames.Diagnostics.Monitoring.Protocol.Photon.Binary.PhotonBinaryWriter Class Reference
Inheritance diagram for ExitGames.Diagnostics.Monitoring.Protocol.Photon.Binary.PhotonBinaryWriter:
ExitGames.Diagnostics.Monitoring.Protocol.PhotonBinaryWriterBase ExitGames.Diagnostics.Monitoring.Protocol.ICounterSampleWriter

Public Member Functions

 PhotonBinaryWriter (int maxQueueLength, ISocketSender socket)
 
 PhotonBinaryWriter (int maxPayloadSize, int serializationBufferSize, int maxQueueLength, ISocketSender socket)
 
 PhotonBinaryWriter (PacketWriterSettings s)
 
override void Publish (CounterSampleCollection[] packages)
 Called by CounterSampleSenderBase to write samples out to some storage. More...
 
- Public Member Functions inherited from ExitGames.Diagnostics.Monitoring.Protocol.PhotonBinaryWriterBase
virtual void Start (CounterSampleSenderBase sender)
 Start writing. Stop is handled by IDisposable implementation. Can be called once. More...
 
void Dispose ()
 
void EnqueueData (byte[] data)
 

Public Attributes

readonly int MaxPayloadSize = 65507
 What is the largest Safe UDP Packet Size on the Internet: http://stackoverflow.com/questions/1098897/what-is-the-largest-safe-udp-packet-size-on-the-internet More...
 
readonly int SerializationBufferSize = 1024
 
- Public Attributes inherited from ExitGames.Diagnostics.Monitoring.Protocol.PhotonBinaryWriterBase
const int DefaultMaxQueueLength = 120
 
readonly int MaxQueueLength = DefaultMaxQueueLength
 Gets a value indicating how many packages should be enqueued for republishing if an error occurred during publishing. The default value is 120. More...
 
readonly LinkedList< byte[]> SendQueue = new LinkedList<byte[]>()
 

Additional Inherited Members

- Static Public Member Functions inherited from ExitGames.Diagnostics.Monitoring.Protocol.PhotonBinaryWriterBase
static ISocketSender CreateSender (CounterSampleSenderSettings s)
 
- Protected Member Functions inherited from ExitGames.Diagnostics.Monitoring.Protocol.PhotonBinaryWriterBase
 PhotonBinaryWriterBase (int maxQueueLength, ISocketSender socket)
 
 PhotonBinaryWriterBase (CounterSampleSenderSettings s)
 
virtual void Dispose (bool disposing)
 
- Properties inherited from ExitGames.Diagnostics.Monitoring.Protocol.PhotonBinaryWriterBase
int QueuedDataSize [get]
 Gets the size of the queued data in bytes. More...
 
bool Ready [get]
 
string SenderId [get]
 
- Properties inherited from ExitGames.Diagnostics.Monitoring.Protocol.ICounterSampleWriter
bool Ready [get]
 Is writer ready to publish any data. IsConnected status is subset of this status. Default implementation is writer started and connected. More...
 

Constructor & Destructor Documentation

ExitGames.Diagnostics.Monitoring.Protocol.Photon.Binary.PhotonBinaryWriter.PhotonBinaryWriter ( int  maxQueueLength,
ISocketSender  socket 
)
inline
ExitGames.Diagnostics.Monitoring.Protocol.Photon.Binary.PhotonBinaryWriter.PhotonBinaryWriter ( int  maxPayloadSize,
int  serializationBufferSize,
int  maxQueueLength,
ISocketSender  socket 
)
inline
ExitGames.Diagnostics.Monitoring.Protocol.Photon.Binary.PhotonBinaryWriter.PhotonBinaryWriter ( PacketWriterSettings  s)
inline

Member Function Documentation

override void ExitGames.Diagnostics.Monitoring.Protocol.Photon.Binary.PhotonBinaryWriter.Publish ( CounterSampleCollection[]  packages)
inlinevirtual

Called by CounterSampleSenderBase to write samples out to some storage.

Reimplemented from ExitGames.Diagnostics.Monitoring.Protocol.PhotonBinaryWriterBase.

Member Data Documentation

readonly int ExitGames.Diagnostics.Monitoring.Protocol.Photon.Binary.PhotonBinaryWriter.MaxPayloadSize = 65507

What is the largest Safe UDP Packet Size on the Internet: http://stackoverflow.com/questions/1098897/what-is-the-largest-safe-udp-packet-size-on-the-internet

Maximum safe UDP payload is = 512 bytes, given minimum RFC internet MTU 576 = 20b/ipv4 + 8b/udp + 512b/data. The correct maximum UDP message size is 65507, as determined by the following formula: 0xffff - (sizeof(IP Header) + sizeof(UDP Header)) = 65535-(20+8) = 65507.

readonly int ExitGames.Diagnostics.Monitoring.Protocol.Photon.Binary.PhotonBinaryWriter.SerializationBufferSize = 1024