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. HN2018省队集训

    HN2018省队集训 Day1 今天的题目来自于雅礼的高二学长\(dy0607\). 压缩包下载 密码: 27n7 流水账 震惊!穿着该校校服竟然在四大名校畅通无阻?霸主地位已定? \(7:10\)从 ...

  2. BZOJ2212 [Poi2011]Tree Rotations 【线段树合并】

    题目链接 BZOJ2212 题解 一棵子树内的顺序不影响其与其它子树合并时的答案,这一点与归并排序的思想非常相似 所以我们只需单独处理每个节点的两棵子树所产生的最少逆序对即可 只有两种情况,要么正序要 ...

  3. Linux基础------文件打包解包---tar命令,文件压缩解压---命令gzip,vim编辑器创建和编辑正文件,磁盘分区/格式化,软/硬链接

    作业一:1) 将用户信息数据库文件和组信息数据库文件纵向合并为一个文件/1.txt(覆盖) cat /etc/passwd /etc/group > /1.txt2) 将用户信息数据库文件和用户 ...

  4. Git入门指南

    git学习资源: Pro Git(中文版) Learn Git in your browser for free with Try Git. Git常用命令 Reference 常用 Git 命令清单 ...

  5. flask学习之解决Internal Server Error问题的方式之一

    最近在学习flask web development的时候,遇到了这么一个问题,就是照着书上敲的代码,跑起来是Internal server error,由于中途学的时候为了方便,改用pycharm来 ...

  6. 配置JNDI数据源

    配置JNDI数据源: 在MATE-INF中新建一个context.xml <?xml version="1.0" encoding="UTF-8"?> ...

  7. nova-api源码分析(WSGI server的创建及启动)

    源码版本:H版 一.前奏 nova api本身作为一个WSGI服务器,对外提供HTTP请求服务,对内调用nova的其他模块响应相应的HTTP请求.分为两大部分,一是服务器本身的启动与运行,一是加载的a ...

  8. 使用$http.post()提交数据后台接收不到

    传参方式是request payload,参数格式是json,而并非用的是form传参,所以在后台用接收form数据的方式接收参数就接收不到了. POST表单请求提交时,使用的Content-Type ...

  9. Ant Design 通过 WeekPicker 获取一周的起止时间

    项目中遇到了选择日期获取当前日期一周的周一和周日的日期,如下: 项目使用的是 ant design,所以第一时间想到了 DatePicker 中的 WeekPicker 组件,查询文档得到 WeekP ...

  10. Ubuntu 下安装sqlite3 及常用SQL 语句

    安装sqlite3命令如下: sudo apt-get install sqlite3 创建或者打开已有的数据库文件: sqlite3 test.db 进入数据库后,可以进行以下常用SQL语句操作: ...