大约有 20 项符合查询结果, 库内数据总量为 30,903 项。 (搜索耗时: 0.0036 秒)
LayaFlash把socket转成webSocket后监听不到connect事件(已解决) AS3代码如下 package { import flash.display.Sprite; import flash.events.Event; import flash.net.Socket; public class TestWebSocket extends Sprite { public var s:Soc...
来源: Laya_社区 发布时间: 20160810
...fDemo也是从你们哪里下载下来模拟的,服务端接收代码 WebSocketFrame frame = (WebSocketFrame)msg; ByteBuf buf = frame.content(); //真正的数据是放在buf里面的 String aa = buf.toString(Charset.forName("utf-8")); //将数据按照utf-8的方式转化为字符串 System.out.p...
来源: Laya_社区 发布时间: 20170405
websocket 中 protobuf 数据的发送与接收的具体方法是怎样的? package test; enum MSG_HEADER { LOGIN_GAME = 0x00000001; JOIN_GAME = 0x00000002; EXIT_GAME = 0x00000003; } message LoginGame { required string account = 1; // 账号 required string passwd = 2; // 密码 }第一次使用p...
来源: Laya_社区 发布时间: 20170217
... trace("发送消息:",msg); output = this.socket.output; output.writeUint16(getCode(msg)); var bytes:WritingBuffer = new WritingBuffer(); msg.writeDelimitedTo(bytes); trace("编码长...
来源: Laya_社区 发布时间: 20180328
我用laya.websocket通信 二进制数据, 服务器对二进制数据进行解析,解析出来不是预期,请问我哪里写错了? 代码如下 var str = new String("大家好,这是websocket通信!"); console.log("str.length*2:" + str.length*2); ...
来源: Laya_社区 发布时间: 20170628
...图透明区域为黑色,其它机型都是正常的。 用了第三方socket类 项目在IDE上可以连接正常运行,为什么打包APK之后在手机上就连接不上socket JS 是没有自动补全提示吗 laya3D动画无法播放 问题状态 最新活动: 2019-08-09 16:04 浏览: 202 ...
来源: Laya_社区 发布时间: 20190809
...图透明区域为黑色,其它机型都是正常的。 用了第三方socket类 项目在IDE上可以连接正常运行,为什么打包APK之后在手机上就连接不上socket JS 是没有自动补全提示吗 laya3D动画无法播放 问题状态 最新活动: 2020-10-26 15:12 浏览: 174 ...
来源: Laya_社区 发布时间: 20190809
...rver; private static final String TAG = "HttpServer"; /** * 服务器端的socket */ ServerSocket server; /** * 服务器监听的端口号 */ public static final int PORT = 8080; // public static HttpServer getInstance(){ // if(httpServer == null){ // httpServer = new HttpServer(); // } // return h...
来源: Laya_社区 发布时间: 20160104
LayaAir引擎 socket大型项目回调 /** * 创建时间 2017/04/16 */ module PomeloLaya{ export class Pomelo{ static DEBUG:boolean = true; static EVENT_IO_ERROR:string = "io-error"; static EVENT_CLOSE:string = "close"; static EVENT_KICK:string = "onKick"; static EVENT_HEART_BEAT_TIMEOUT:string = ...
来源: Laya_社区 发布时间: 20180119
...ttp连接2.1 Laya.HttpRequest2.2 GET2.3 POST2.4 扩展HttpRequest三、 WebSocket连接3.1 Laya.Sokcet3.2 Laya.Byte 二进制读写四、ProtocolBuffer使用4.1 Message 定义4.2 项目中添加protobuf 类库4.3 加载协议文件4.4 Message 方法4.5 代码示例网络通信 一、概述 在我们...
来源: Laya3.0_文档 发布时间: 20250104