|
10精币
- s.BinBuffer.prototype.writeInt64 = function(t) {
- if (typeof t == "string") {
- this.allocate(8);
- for (var e = 0, i = 0, r = (t = t.toLowerCase()).length, s = 0; s < r; s++) {
- var o = t.charCodeAt(s) - 48;
- o > 9 && (o -= 39),
- e = 10 * e + o,
- i = 10 * i + Math.floor(e / 4294967296),
- e %= 4294967296
- }
- return this.vew.setUint32(this.position, i),
- this.vew.setUint32(this.position + 4, e),
- this.position += 8,
- void (this.len = this.position)
- }
- this.allocate(8),
- this.vew.setUint32(this.position, parseInt(t / 4294967296)),
- this.vew.setUint32(this.position + 4, t % 4294967296),
- this.position += 8,
- this.len = this.position
- }
- s.JceOutputStream.prototype.writeString = function(t, e) {
- var i = e;
- try {
- i = unescape(encodeURIComponent(i))
- } catch (t) {}
- i.length > 255 ? (this.writeTo(t, s.DataHelp.EN_STRING4),
- this.buf.writeUInt32(i["length"])) : (this.writeTo(t, s[DataHelp].EN_STRING1),
- this.buf.writeUInt8(i[length])),
- this.buf[writeString](i)
- }
- s.JceOutputStream.prototype.writeInt32 = function(t, e) {
- e >= -32768 && e <= 32767 ? this.writeInt16(t, e) : (this.writeTo(t, s.DataHelp.EN_INT32),
- this.buf.writeInt32(e))
- }
- s.BinBuffer.prototype.writeInt32 = function(t) {
- this.allocate(4),
- this.vew.setInt32(this.position, t),
- this.position += 4,
- this.len = this.position
- }
- s.BinBuffer.prototype.allocate = function(t) {
- if (t = this.position + t,
- !(null != this.buf && this.buf.length > t)) {
- var e = new ArrayBuffer(Math.max(256, 2 * t));
- null != this.buf && (new Uint8Array(e).buf(new Uint8Array(this.buf)),
- this.buf = void 0),
- this.buf = e,
- this.vew = void 0,
- this.vew = new DataView(this.buf)
- }
- }
- c.WSConnectParaInfo.prototype.writeTo = function (t) {
- t.writeInt64(0, this.lUid),
- t.writeString(1, this.sGuid),
- t.writeString(2, this.sUA),
- t.writeString(3, this.sAppSrc),
- t.writeString(4, this.sMid),
- t.writeString(5, this.sExp),
- t.writeInt32(6, this.iTokenType),
- t.writeString(7, this.sToken),
- t.writeString(8, this.sCookie)
- };
复制代码 如题,希望大佬不吝赐教,是真的想学点东西!
|
最佳答案
查看完整内容
https://bbs.125.la/forum.php?mod=viewthread&tid=14684558&extra=
|