What’s in Photon 3 Photon3是什么

1. High Performance S2S API (Native/C++) 高品质的S2S API

     A while back we introduced the TCPClient a managed class better
suited for server to server communication than the standard client
library. The TCPClient had two disadvantages: First the programming
model on both ends of the connection was different (TCPClient on one
side, peer on the other), second it was designed for low-bandwidth
communication. With this release Photon can setup a connection to other
Photon instances leveraging the networking power of the Photon Core
while allowing to use the same programming model using peers on both
ends of the connection.



2. Load Balancing 负载均衡


     With Photon Load Balancing, developers are enabled to create
scalable multi-node solutions. It includes out of the box a master
server hosting the lobby and game servers to host the active games. The
Lite Lobby Application is delivered with a set of matchmaking methods
and a load balancing component that distributes the load (where to
create new games).

 Photon负载均衡,开发人士可以成立可扩充的多节点的化解方案。它包涵了贰个主服务来托管大厅和三个游戏服务来托管游戏。这些Lite Lobby应用程序是经过设置配对方法和行使负载均衡组件分配负载来拓展付出工作的。


3. Event Caching 事件缓存

     So far, Lite had “Properties” for rooms and actors to store values
for players who join later on. They are a nice idea but a bit clumsy to
use: Whenever something has to be stored, you had to set properties. In
all other cases, you send events.The new Lite Application combines both
and gives you caching for events. Per player and event, you could cache
the values in it. If anyone joins, the events are sent immediately, like
they were just raised.



4. Extended Data Type Support 支撑数据类型的恢宏

     Photon now supports more data-types than ever: Null values,
dictionaries, arrays of objects (each with its own type) and even custom
classes can be integrated and used in events.



5. The Peer has new properties Peer的新属性

     NetworkProtocol, LocalIP, LocalPort.


6. Up to now you configured a global default

     Now it is also possible to define a default application per


Changed 改变

1. Lite and Lite Lobby Code-Cleanup Lite和Lite Lobby代码清理

     Event-, Operation- and Parameter-Codes are cleaned up. Everything
was reassigned and the predefined codes should be out of your way now.
There is an extra page which lists each old and new value.



2. Type of Codes 代码的品类

     We decided to keep using bytes as type for codes. It’s just
effective and lean. If needed, any operation or event could get
sub-codes (not supported out of the box).The ReturnCode for
operation responses was of type int. This is now short-typed. Not
extremely lean. But short.



3. Protocol Cleanup 协议清理 

     We cleaned up the protocol for Photon 3. This is next to invisible
for you, but has some benefits. Most of all, the new protocol does no
longer hard-code any codes. Any code for operations, results, parameters
or events can be defined by your code.



4. Error Handling 错误处理

     The error handling was re-designed to


  • always call the unhandled exception event handler
  • it is no longer required to initialize the logging facade
  • introduced three policies for unhandled exceptions: ignore, restart
    application, end process
  • consistent behavior: before unhandled exceptions in threads
    controlled by Photon where logged and then ignored, those in other
    threads usually terminated the process. 

  • 连接调用未处理的不胜事件处理
  • 不再需求先河化 logging facade
  • 对此未处理的这几个有以下多个政策:忽略、 重启应用程序、终止进程
  • 同一的行事:在线程通过Photon登录和忽略来支配未处理的很是此前,其余线程寻常会甘休那个历程。

     Note: due to a bug in 2.6 sometimes exceptions where “transformed”
into ThreadAbortException or the application was unloaded without
being loaded again (this is also fixed with 2.6.28).


5. Server SDK Changes (breaking) 服务器SDK改变(破坏)

  • Peer classes are now required to inherit from class ‘PeerBase’. The
    former interface IPeer and class PhotonPeer were removed. Take a
    thorough look at the PeerBase class definition as it is a central
    piece of your application.
  • Applications are now required to inherit from class
    ‘ApplicationBase’. Like PeerBase this is one of the most important
  • Classes ResponseParameterAttributeRequestParameterAttribute and EventParameterAttribute have
    been substituted with class DataMemberAttribute. As a
    consequence, request and response parameters can not be part of the
    same container class anymore.
  • The Params property of
    classes EventDataOperationRequest and OperatioResponse has
    been substituted wth the new property Parameters. This
    dictionary’s keys are now of type byte.
  • The property EventData.EventCode has been renamed
    to ‘Code’ and its type was changed to byte.
  • The type of the
    properties OperationRequest.OperationCode and OperationResponse.OperationCode has
    been changed to byte.
  • The new class DataContract substitutes
    classes Operation and Event. While class Operation remains
    part of the framework it is not mandatory to use it in order to
    convert the parameters to class properties anymore.
  • Methods Event.GetEventData and Operation.GetOperationResponse have
    been removed. Instead use the
    new OperationResponse and EventData constructors.
  • PhotonPeer.SendBufferFull was removed.
    Override PeerBase.OnSendBufferFull to respond to a full send
    buffer. The counterpart PeerBase.OnSendBufferEmpty is called
    when Photon is ready to send more data.

  • Peer类以往必要继承类自PeerBase。接口IPeer和类PhotonPeer
  • 应用程序以后必须继续自类
  • 类 ResponseParameterAttribute 、 RequestParameterAttribute 和
    伊夫ntParameterAttribute 被类DataMemberAttribute
  • 类 伊夫ntData , OperationRequest 和 OperatioResponse
  • 属性伊芙ntData.伊芙ntCode 已经更名为 “Code” 和它的项目改为byte。
  • OperationRequest.OperationCode 和 OperationResponse.OperationCode
  • 本条新类DataContract
    替代了类 Operation 和 Event。尽管类的操作是framework的一有的,为了转移参数为类的属性它是不强制被应用的。
  • 措施 伊夫nt.Get伊夫ntData 和 Operation.GetOperationResponse
    已被移除。而使用新的 OperationResponse 和 伊夫ntData 构造函数。
  • PhotonPeer.SendBufferFull 已被移除。覆盖 PeerBase.OnSendBufferFull
    来响应一个总体的发送缓冲区。当Photon是准备好并发送更加多的数目时这几个PeerBase.OnSendBufferEmpty 会被调用。

6. Client SDK Changes (breaking) 客户端SDK改变(破坏)

  • renamed IPhotonListener interface
    member OperationResult to OnOperationResponseEventAcion to OnEvent and PeerStatusCallback to OnStatusChanged.
  • The different parameters of the
    old OperationResult (OperationCodeParameters, …) are
    passed in one object OperationResponse. Same applies
    to OnEvent now has one parameter EventData.
  • Support for invocation ID was removed.

  • 更名IPhotonListener接口成员 OperationResult 为 OnOperationResponse
    、 EventAcion 为 On伊芙nt 和 PeerStatusCallback 为 OnStatusChanged 。
  • 旧的 OperationResult ( OperationCode , 参数
    ,…)的不等参数被传送在1个 OperationResponse 对象里。同样适用于
    On伊夫nt 有二个参数 伊夫ntData。
  • 帮忙调用ID已被移除。
  1. PhotonHostRuntime version attribute was removed from the config file
    and is no longer required – we recommend to remove it to ease
    feature updates.
  2. The application NetSyncObjects is no longer part of the SDK.
  3. Changed default for dump files from mini to full
  4. Added version display to log file during start up.

  1. PhotonHostRuntime
  2. 应用程序NetSyncObjects不再是SDK的一有个别。
  3. 更改转储文件的暗许选项从迷你到全方位。
  4. 加上版本显得到日志文件在起步的时候。

Bug Fixes Bug修复

  1. Fixed a memory leak when canceling actions scheduled on a fiber.
  2. S2S.TCPClient did not close the socket at disconnect which caused an
    error when calling Connect again.
  3. Flash policy file is claimed malformed with a top-level XML tag that
    is not, see
  4. Fixed CLR startup to ensure GC Server is used (issue affected .net
    4.0 only).
  5. Fixed ENet fragmented buffering flow control bug.
  6. Fixed TCP magic byte issues – fragmented pings where not parsed
    correctly and an issue in the internal handling of the size of
    packets could lead to parsing errors (bigger packets and high load).
  7. Fixed Photon hang on shutdown trying to log on a dead logging
  8. Fixed the method Peer GetRemoteAddress – due to a caching issue
    the result was wrong in some cases.
  9. Fixed mini dumps – now obey configured limits.
  10. Changed PhotonPeer::GetRemotePort so that it doesn’t rely on a
    cached port.

  1. 改正了当裁撤线程池的移动时内存的透漏。
  2. S2S。
  3. Flash策略文件被声称为非符合规律的万丈阶段的XML标记,其实它不是,看到
  4. 考订了CL奥迪Q3运维时以担保GC服务器是可用的。
  5. 查对了eNet分散缓冲流控制的错误。
  6. 改正了TCP魔法字节问题——不正确的解析ping
  7. 核对了Photon在关机时试图在三个关门的日志实例进行记录。
  8. 矫正了法子peer GetRemoteAddress
  9. 核对迷你转储——以后听从布署的限量。
  10. 修改了 PhotonPeer::GetRemotePort ,因而,它不借助于1个缓存的端口。