protected static void __hx_ctor_org_msgpack_Decoder(global::org.msgpack.Decoder __hx_this, global::haxe.io.Bytes b, global::org.msgpack.DecodeOption option) { #line 35 "D:\\project\\sangong\\sangong\\src\\org\\msgpack\\Decoder.hx" global::haxe.io.BytesInput i = new global::haxe.io.BytesInput(b, null, null); i.set_bigEndian(true); #line 37 "D:\\project\\sangong\\sangong\\src\\org\\msgpack\\Decoder.hx" __hx_this.o = __hx_this.decode(i, option); }
public static void addBytes(global::haxe.io.Bytes bytes, global::server.IHander hander, global::haxe.lang.Function callBack) { unchecked { #line 360 "D:\\project\\sangong\\sangong\\src\\web\\proto\\PacketBuilder.hx" if ((hander != null)) { #line 361 "D:\\project\\sangong\\sangong\\src\\web\\proto\\PacketBuilder.hx" return; } #line 363 "D:\\project\\sangong\\sangong\\src\\web\\proto\\PacketBuilder.hx" if ((bytes == null)) { #line 364 "D:\\project\\sangong\\sangong\\src\\web\\proto\\PacketBuilder.hx" return; } #line 367 "D:\\project\\sangong\\sangong\\src\\web\\proto\\PacketBuilder.hx" if ((bytes.length > 1000)) { #line 368 "D:\\project\\sangong\\sangong\\src\\web\\proto\\PacketBuilder.hx" callBack.__hx_invoke4_o(default(double), false, default(double), null, default(double), global::web.proto.Web_Error.ERROR, default(double), hander); } #line 371 "D:\\project\\sangong\\sangong\\src\\web\\proto\\PacketBuilder.hx" if ((global::web.proto.PacketBuilder.bytesBuff == null)) { #line 372 "D:\\project\\sangong\\sangong\\src\\web\\proto\\PacketBuilder.hx" global::web.proto.PacketBuilder.bytesBuff = bytes; } else { #line 374 "D:\\project\\sangong\\sangong\\src\\web\\proto\\PacketBuilder.hx" global::haxe.io.BytesBuffer buffer = new global::haxe.io.BytesBuffer(); { #line 375 "D:\\project\\sangong\\sangong\\src\\web\\proto\\PacketBuilder.hx" global::haxe.io.Bytes src = global::web.proto.PacketBuilder.bytesBuff; #line 375 "D:\\project\\sangong\\sangong\\src\\web\\proto\\PacketBuilder.hx" (buffer.b as global::System.IO.Stream).Write(((byte[])(src.b)), ((int)(0)), ((int)(src.length))); } #line 376 "D:\\project\\sangong\\sangong\\src\\web\\proto\\PacketBuilder.hx" (buffer.b as global::System.IO.Stream).Write(((byte[])(bytes.b)), ((int)(0)), ((int)(bytes.length))); global::web.proto.PacketBuilder.bytesBuff = buffer.getBytes(); } #line 379 "D:\\project\\sangong\\sangong\\src\\web\\proto\\PacketBuilder.hx" if (((global::web.proto.PacketBuilder.bytesBuff == null) || (global::web.proto.PacketBuilder.bytesBuff.length < 10))) { #line 380 "D:\\project\\sangong\\sangong\\src\\web\\proto\\PacketBuilder.hx" return; } #line 382 "D:\\project\\sangong\\sangong\\src\\web\\proto\\PacketBuilder.hx" int available = global::web.proto.PacketBuilder.bytesBuff.length; global::haxe.io.BytesInput bi = new global::haxe.io.BytesInput(global::web.proto.PacketBuilder.bytesBuff, null, null); #line 384 "D:\\project\\sangong\\sangong\\src\\web\\proto\\PacketBuilder.hx" bi.set_bigEndian(false); while ((available >= 10)) { #line 387 "D:\\project\\sangong\\sangong\\src\\web\\proto\\PacketBuilder.hx" int z = bi.readByte(); int h = bi.readByte(); #line 389 "D:\\project\\sangong\\sangong\\src\\web\\proto\\PacketBuilder.hx" int y = bi.readByte(); int v1 = bi.readByte(); #line 391 "D:\\project\\sangong\\sangong\\src\\web\\proto\\PacketBuilder.hx" int v2 = bi.readByte(); int v3 = bi.readByte(); #line 393 "D:\\project\\sangong\\sangong\\src\\web\\proto\\PacketBuilder.hx" int packetSize = bi.readInt32(); available -= 10; #line 396 "D:\\project\\sangong\\sangong\\src\\web\\proto\\PacketBuilder.hx" if (!(global::web.proto.PacketBuilder.checkKey(z, h, y, v1, v2, v3))) { #line 397 "D:\\project\\sangong\\sangong\\src\\web\\proto\\PacketBuilder.hx" global::web.proto.PacketBuilder.bytesBuff = null; global::haxe.Log.trace.__hx_invoke2_o(default(double), "f**k you !!! error message", default(double), new global::haxe.lang.DynamicObject(new int[] { 302979532, 1547539107, 1648581351 }, new object[] { "addBytes", "web.proto.PacketBuilder", "src/web/proto/PacketBuilder.hx" }, new int[] { 1981972957 }, new double[] { ((double)(398)) })); #line 399 "D:\\project\\sangong\\sangong\\src\\web\\proto\\PacketBuilder.hx" available = 0; callBack.__hx_invoke4_o(default(double), false, default(double), null, default(double), global::web.proto.Web_Error.ERROR, default(double), hander); #line 402 "D:\\project\\sangong\\sangong\\src\\web\\proto\\PacketBuilder.hx" break; } #line 405 "D:\\project\\sangong\\sangong\\src\\web\\proto\\PacketBuilder.hx" bool error = false; if ((packetSize <= available)) { #line 407 "D:\\project\\sangong\\sangong\\src\\web\\proto\\PacketBuilder.hx" available -= packetSize; global::haxe.io.Bytes msgBytes = bi.read(packetSize); #line 410 "D:\\project\\sangong\\sangong\\src\\web\\proto\\PacketBuilder.hx" try { #line 411 "D:\\project\\sangong\\sangong\\src\\web\\proto\\PacketBuilder.hx" object p = global::org.msgpack.MsgPack.decode(msgBytes, null); #line 413 "D:\\project\\sangong\\sangong\\src\\web\\proto\\PacketBuilder.hx" callBack.__hx_invoke4_o(default(double), true, default(double), p, default(double), global::web.proto.Web_Error.OK, default(double), hander); } catch (global::System.Exception catchallException) { #line 410 "D:\\project\\sangong\\sangong\\src\\web\\proto\\PacketBuilder.hx" global::haxe.lang.Exceptions.exception = catchallException; #line 415 "D:\\project\\sangong\\sangong\\src\\web\\proto\\PacketBuilder.hx" { #line 415 "D:\\project\\sangong\\sangong\\src\\web\\proto\\PacketBuilder.hx" object e = (((catchallException is global::haxe.lang.HaxeException)) ? (((global::haxe.lang.HaxeException)(catchallException)).obj) : ((object)(catchallException))); #line 415 "D:\\project\\sangong\\sangong\\src\\web\\proto\\PacketBuilder.hx" callBack.__hx_invoke4_o(default(double), false, default(double), null, default(double), global::web.proto.Web_Error.ERROR, default(double), hander); } } #line 417 "D:\\project\\sangong\\sangong\\src\\web\\proto\\PacketBuilder.hx" break; } else { #line 420 "D:\\project\\sangong\\sangong\\src\\web\\proto\\PacketBuilder.hx" available += 10; #line 422 "D:\\project\\sangong\\sangong\\src\\web\\proto\\PacketBuilder.hx" break; } } #line 425 "D:\\project\\sangong\\sangong\\src\\web\\proto\\PacketBuilder.hx" global::web.proto.PacketBuilder.bytesBuff = null; available = 0; #line 428 "D:\\project\\sangong\\sangong\\src\\web\\proto\\PacketBuilder.hx" return; } #line default }