-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path杂记.txt
More file actions
160 lines (80 loc) · 3.62 KB
/
Copy path杂记.txt
File metadata and controls
160 lines (80 loc) · 3.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
2019/8/10
public ulong HashCode { get { return Name.GetHashCode(); } }
msgdispatcher
2019/8/12
svn: E170013: Unable to connect to a repository at URL 'https://github.com/xieliujian/UnityFramework.git'
svn: E670008: nodename nor servname provided, or not known
macbook 暂时换回自动ip, 解决问题
flatbuffers_vs_proj
大世界
Floating Point Fix system 浮点修正系统
原生环境开发可能石像开发阶段暴露出问题
HttpWebRequest
HttpWebResponse
LogCategory
GameLogic
export PATH=${PATH}:/usr/local/mysql/bin
------------------------------------8/25----------------------------------
public override void SendFBMsg(ulong msgid, FlatBufferBuilder builder)
{
byte[] bytearray = builder.DataBuffer.ToSizedArray();
gtmInterface.ByteBuffer buff = new gtmInterface.ByteBuffer();
UInt16 lengh = (UInt16)(bytearray.Length + sizeof(ulong));
UInt16 biglen = Converter.GetBigEndian(lengh);
buff.WriteShort(biglen);
buff.WriteUlong(msgid);
buff.WriteBytes(bytearray);
if (NetManager.instance != null)
{
NetManager.instance.SendMessage(buff);
}
}
byte[] bytearray = builder.DataBuffer.ToSizedArray(); 这个函数最好去掉,直接把flatbuffer的二进制数据写入发送buff中
--------------------------------------------------------------------------
------------------------------------8/30----------------------------------
xLua抛出异常 try to dispose a LuaEnv with C# callback!
解决方案 https://www.bbsmax.com/A/n2d9MjYvdD/
--------------------------------------------------------------------------
------------------------------------8/31----------------------------------
[CSharpCallLua]
public static List<Type> CSharpCallLua
{
get
{
List<Type> typelist = new List<Type>()
{
typeof(Action),
//
typeof(Action<ulong, byte[]>),
};
return typelist;
}
}
CSharpCallLua 可以生成Action代理的泛型方法吗, 代理类型需要一个一个手动添加
--------------------------------------------------------------------------
------------------------------------8/31----------------------------------
// 这个是从flatbuffer里面复制一份数据出来
//byte[] bytearray = builder.DataBuffer.ToSizedArray();
//gtmInterface.ByteBuffer buff = new gtmInterface.ByteBuffer();
//UInt16 lengh = (UInt16)(bytearray.Length + sizeof(ulong));
//UInt16 biglen = Converter.GetBigEndian(lengh);
//buff.WriteShort(biglen);
//buff.WriteUlong(msgid);
//buff.WriteBytes(bytearray);
// 这里做了优化处理,不从flatbuffer里面复制一份数据出来, 而是直接取数据, 减少一次拷贝
int msgpos = builder.DataBuffer.Position;
int msglen = builder.DataBuffer.Length - builder.DataBuffer.Position;
gtmInterface.ByteBuffer buff = new gtmInterface.ByteBuffer();
UInt16 lengh = (UInt16)(msglen + sizeof(ulong));
UInt16 biglen = Converter.GetBigEndian(lengh);
buff.WriteShort(biglen);
buff.WriteUlong(msgid);
buff.WriteBytes(builder.DataBuffer.RawBuffer, msgpos, msglen);
if (NetManager.instance != null)
{
NetManager.instance.SendMessage(buff);
}
--------------------------------------------------------------------------
------------------------------------8/31----------------------------------
lua builder.lua 没有clear()函数,每次发送消息都要new一个新的出来,频繁的创建释放会有很多gc
--------------------------------------------------------------------------