Photon3Unity3D.dll 解析一
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 解析一的更多相关文章
- Photon3Unity3D.dll 解析四——LitePeer
LitePeer 玩家 Connect 连接服务器 Disconnect 断开与服务器的连接 OpJoin 进入游戏 OpLeave 离开游戏,但仍与服务器保持连接 ...
- Photon3Unity3D.dll 解析三——OperationRequest、OperationResponse
OperationRequest 代表Operation操作的Request,包含Code和Parameters OperationCode Byte类型的值,代表操作,由LiteOpCode定义了 ...
- Photon3Unity3D.dll 解析二——EventData
EventData 包含Photon事件的所有内容 Code 用于表示事件,相当于主键ID,LiteEventCode定义了一部分服务端普遍事件事件: Parameters 事 ...
- Newtonsoft.Json.dll解析json的dll文件使用
要解析的json //解析前 //解析前 {,,,,,,,,,,},,,,,,,,,,,},,,,,,,,,,,,,,,,},,,,,,,,,},,,,,,,,,,,,},,,,,,,,,,,},,, ...
- riched32.dll riched20.dll msftedit.dll 解析
摘要: 本文对Rich Edit控件底层消息机制进行了讲解,以期读者对Windows平台下的Rich Edit控件有一个更深入的认识,同时对于使用Win32 SDK进行开发的人员具有一定参考价值.因为 ...
- MFC使用自带的MSXML6.dll解析xml(开发环境vc2010)
程序是win32控制台程序 // msxml.cpp : 定义控制台应用程序的入口点. #include "stdafx.h" #include <iostream> ...
- Sharepoint学习笔记—习题系列--70-573习题解析 -(Q127-Q130)
Question 127You create a custom list named Products.You need to perform a Representational State Tra ...
- IIS文件名解析漏洞扼要分析
概括: 从技术角度分析IIS6文件名解析漏洞的原理与IIS7的相关情况. a.IIS6错误解析文件类型现象 1.当WEB目录下,文件名以 xxx.asp;xxx.xxx 来进行命名的时候,此文件将送交 ...
- C#对json数据的解析
一,基础知识 JSON(JavaScript Object Notation) 是一种轻量级的数据交换格式.它基于JavaScript的一个子集. JSON采用完全独立于语言的文本格式,但是也使用了类 ...
随机推荐
- HBase多租户机制分析
在HBase1.1.0发布之前,HBase同一集群上的用户.表都是平等的,没有优劣之分.这种’大同’社会看起来完美,实际上有很多问题.最棘手的主要有这么两个,其一是某些业务较其他业务重要,需要在资源有 ...
- Exception异常 自定义异常
public class Exception extends Throwable Exception 类及其子类是 Throwable 的一种形式,它指出了合理的应用程序想要捕获的条件. public ...
- BZOJ4152:[AMPPZ2014]The Captain——题解
https://www.lydsy.com/JudgeOnline/problem.php?id=4152 给定平面上的n个点,定义(x1,y1)到(x2,y2)的费用为min(|x1-x2|,|y1 ...
- BZOJ3771 Triple 【NTT + 容斥】
题目链接 BZOJ3771 题解 做水题放松一下 先构造\(A_i\)为\(x\)指数的生成函数\(A(x)\) 再构造\(2A_i\)为指数的生成函数\(B(x)\) 再构造\(3A_i\)为指数的 ...
- mysql数据库----索引补充
1.索引 索引是表的目录,在查找内容之前可以先在目录中查找索引位置,以此快速定位查询数据.对于索引,会保存在额外的文件中. 2.索引种类 普通索引:仅加速查询 唯一索引:加速查询 + 列值唯一(可以有 ...
- [转载]DataView详解
表示用于排序.筛选.搜索.编辑和导航的 DataTable 的可绑定数据的自定义视图. DataView的功能类似于数据库的视图,他是数据源DataTable的封装对象,可以对数据源进行排序.搜索.过 ...
- 洛谷P1290 欧几里得的游戏
题目描述 欧几里德的两个后代Stan和Ollie正在玩一种数字游戏,这个游戏是他们的祖先欧几里德发明的.给定两个正整数M和N,从Stan开始,从其中较大的一个数,减去较小的数的正整数倍,当然,得到的数 ...
- js 时间戳 和 格式化时间转化
function timestampToTime(timestamp) { var date = new Date(timestamp * 1000);//时间戳为10位需*1000,时间戳为13位的 ...
- SpringCloud学习(3)——Eureka服务注册中心及服务发现
Eureka概述: Eureka是Netflix的一个子模块, 也是核心模块之一.Eureka是一个基于REST的服务, 用于定位服务, 以实现云端中间层服务发现和故障转移.服务注册与发现对于微服务框 ...
- gcd的性质+分块 Bzoj 4028
4028: [HEOI2015]公约数数列 Time Limit: 10 Sec Memory Limit: 256 MBSubmit: 865 Solved: 311[Submit][Statu ...