IPhotonPeerListener  Photon客户端回调接口

   1:  //只要有来自Photon Server的事件就触发
   2:  public virtual void OnEvent( EventData photonEvent )
   3:  {
   4:      this.DebugReturn( String.Format( "OnEvent: {0}", photonEvent.ToStringFull() ) );
   5:  }
   6:   
   7:  //当状态改变时调用
   8:  public virtual void OnStatusChanged( StatusCode statusCode )
   9:  {
  10:      this.DebugReturn( String.Format( "OnStatusChanged: {0}", statusCode ) );
  11:   
  12:      switch (statusCode)
  13:      {
  14:          case StatusCode.Connect:
  15:              this.State = ClientState.Connected;
  16:              break;
  17:          case StatusCode.Disconnect:
  18:              this.State = ClientState.Disconnected;
  19:              this.ActorNumber = 0;
  20:              break;
  21:          case StatusCode.ExceptionOnConnect:
  22:              this.OfflineReason = "Connection failed.\nIs the server online? Firewall open?";
  23:              break;
  24:          case StatusCode.SecurityExceptionOnConnect:
  25:              this.OfflineReason = "Security Exception on connect.\nMost likely, the policy request failed.\nIs Photon and the Policy App running?";
  26:              break;
  27:          case StatusCode.Exception:
  28:              this.OfflineReason = "Communication terminated by Exception.\nProbably the server shutdown locally.\nOr the network connection terminated.";
  29:              break;
  30:          case StatusCode.TimeoutDisconnect:
  31:              this.OfflineReason = "Disconnect due to timeout.\nProbably the server shutdown locally.\nOr the network connection terminated.";
  32:              break;
  33:          case StatusCode.DisconnectByServer:
  34:              this.OfflineReason = "Timeout Disconnect by server.\nThe server did not get responses in time.";
  35:              break;
  36:          case StatusCode.DisconnectByServerLogic:
  37:              this.OfflineReason = "Disconnect by server.\nThe servers logic (application) disconnected this client for some reason.";
  38:              break;
  39:          case StatusCode.DisconnectByServerUserLimit:
  40:              this.OfflineReason = "Server reached it's user limit.\nThe server is currently not accepting connections.\nThe license does not allow it.";
  41:              break;
  42:          default:
  43:              this.DebugReturn( "StatusCode not handled: " + statusCode );
  44:              break;
  45:      }
  46:  }
  47:   
  48:  //当操作响应时调用
  49:  public virtual void OnOperationResponse( OperationResponse operationResponse )
  50:  {
  51:      this.DebugReturn( String.Format( "OnOperationResponse: {0}", operationResponse.ToStringFull() ) );
  52:   
  53:      switch (operationResponse.OperationCode)
  54:      {
  55:          case (byte)LiteOpCode.Join:
  56:              this.State = ClientState.InRoom;
  57:              this.ActorNumber = (int)operationResponse[(byte)LiteOpKey.ActorNr];
  58:              break;
  59:          case (byte)LiteOpCode.Leave:
  60:              this.State = ClientState.Connected;
  61:              break;
  62:      }
  63:  }
  64:   
  65:  //服务端主动发出的信息通知
  66:  public void DebugReturn( DebugLevel level, string message )
  67:  {
  68:      this.DebugReturn( message );
  69:  }

.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }

.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }

 

Photon3Unity3D.dll 解析一的更多相关文章

  1. Photon3Unity3D.dll 解析四——LitePeer

    LitePeer 玩家 Connect      连接服务器 Disconnect  断开与服务器的连接 OpJoin        进入游戏 OpLeave     离开游戏,但仍与服务器保持连接 ...

  2. Photon3Unity3D.dll 解析三——OperationRequest、OperationResponse

    OperationRequest 代表Operation操作的Request,包含Code和Parameters OperationCode  Byte类型的值,代表操作,由LiteOpCode定义了 ...

  3. Photon3Unity3D.dll 解析二——EventData

    EventData 包含Photon事件的所有内容 Code           用于表示事件,相当于主键ID,LiteEventCode定义了一部分服务端普遍事件事件: Parameters   事 ...

  4. Newtonsoft.Json.dll解析json的dll文件使用

    要解析的json //解析前 //解析前 {,,,,,,,,,,},,,,,,,,,,,},,,,,,,,,,,,,,,,},,,,,,,,,},,,,,,,,,,,,},,,,,,,,,,,},,, ...

  5. riched32.dll riched20.dll msftedit.dll 解析

    摘要: 本文对Rich Edit控件底层消息机制进行了讲解,以期读者对Windows平台下的Rich Edit控件有一个更深入的认识,同时对于使用Win32 SDK进行开发的人员具有一定参考价值.因为 ...

  6. MFC使用自带的MSXML6.dll解析xml(开发环境vc2010)

    程序是win32控制台程序 // msxml.cpp : 定义控制台应用程序的入口点. #include "stdafx.h" #include <iostream> ...

  7. Sharepoint学习笔记—习题系列--70-573习题解析 -(Q127-Q130)

    Question 127You create a custom list named Products.You need to perform a Representational State Tra ...

  8. IIS文件名解析漏洞扼要分析

    概括: 从技术角度分析IIS6文件名解析漏洞的原理与IIS7的相关情况. a.IIS6错误解析文件类型现象 1.当WEB目录下,文件名以 xxx.asp;xxx.xxx 来进行命名的时候,此文件将送交 ...

  9. C#对json数据的解析

    一,基础知识 JSON(JavaScript Object Notation) 是一种轻量级的数据交换格式.它基于JavaScript的一个子集. JSON采用完全独立于语言的文本格式,但是也使用了类 ...

随机推荐

  1. Unity3D手游开发日记(5) - 适合移动平台的植被随风摆动

    一直在思考怎么让场景更有生机,我觉得植被的随风摆动是必不可少的.CE3引擎的植被bending就做得特别棒.我也准备在手机上做一套. 先分析一下植被摆动常见的几种做法.其实不管哪种做法,核心就是让植被 ...

  2. msiexec安装参数详解

    原文链接地址:https://blog.csdn.net/wilson_guo/article/details/8151632 1 安装 /i表示安装,/x 表示卸载/f表示修复./l*v 表示输出详 ...

  3. Linux(三)高级文本处理命令

    一.cut (cut 命令可以从一个文本文件或者文本流中提取文本列 ) 1.cut语法 cut -d '分隔字符' -f fields         用于有特定分隔字符 cut  -c 字符区间   ...

  4. centos上部署nginx服务

    Nginx ("engine x") 是一个高性能的HTTP和反向代理服务器,也是一个IMAP/POP3/SMTP服务器.Nginx是由Igor Sysoev为俄罗斯访问量第二的R ...

  5. 图像BMP格式介绍

    1 图像BMP格式说明 BMP是一种与硬件设备无关的图像文件格式,使用非常广.它采用位映射存储格式,除了图像深度可选以外,不采用其他任何压缩,因此,BMP文件所占用的空间很大.BMP文件的图像深度可选 ...

  6. Codeforces Round #409 (rated, Div. 2, based on VK Cup 2017 Round 2) A B C D 暴力 水 二分 几何

    A. Vicious Keyboard time limit per test 2 seconds memory limit per test 256 megabytes input standard ...

  7. NYOJ--703

    原题链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=703 分析:先考虑不受限制的情况,此时共可以修n*(n-1)/2条隧道:所有的place组 ...

  8. bzoj 2277 [Poi2011]Strongbox 数论

    2277: [Poi2011]Strongbox Time Limit: 60 Sec  Memory Limit: 32 MBSubmit: 527  Solved: 231[Submit][Sta ...

  9. 组合计数 && Stirling数

    参考: http://blog.csdn.net/qwb492859377/article/details/50654627 http://blog.csdn.net/acdreamers/artic ...

  10. 前端PHP入门-005-爱情是常量还是变量

    常量 常--汉语字面为:长久,经久不变. 常量那就好翻译了:长久不变的值. 常量的使用范围非常广泛. 我们在以后,定义我们的工作目录.定义一些特点的帐户密码.版本号等我们都会使用到常量.所以这一块的知 ...