cocos websocket前后端对接

项目总价 500元
预估日薪 500/天
合作方式: 项目制
预估工时: 1天
发布位置: 成都
参与范围: 全国远程
llg
llg
职位ID: 153682复制

发布方信用行为

发布项目
0
订单总数
0
退款单数

需求描述

需求:
前端使用cocos creater ts开发,websocket连接后端出现onopen不回调,关闭时要回调onclose
如下代码为前端代码:
import { Component, Node, log } from 'cc';
import EventMgr from "../EventMgr";

var State = {
Disconnected: 0, // 断开连接
Connecting: 1, // 正在连接
Connected: 2, // 已经连接;
};


export default class NetMgr extends Component {
public static Instance: NetMgr = null as unknown as NetMgr;

private url: string = null as unknown as string;
private state: number = State.Disconnected;
private sock: WebSocket|null = null as unknown as WebSocket;

onLoad() {
if (NetMgr.Instance === null) {
NetMgr.Instance = this;
}
else {
this.destroy();
return;
}

this.state = State.Disconnected;
}
......

人才:
要求熟悉netty和cocos creater

参考:
辅助解决bug
合作方式:
按次数合作

cocos websocket前后端对接

合作方式 项目制
预估日薪 500
预估总价 500元
预估工时 1天
发布位置 成都
可参与范围 全国远程
职位ID 153682复制
发布方 llg
llg

需求描述

需求:
前端使用cocos creater ts开发,websocket连接后端出现onopen不回调,关闭时要回调onclose
如下代码为前端代码:
import { Component, Node, log } from 'cc';
import EventMgr from "../EventMgr";

var State = {
Disconnected: 0, // 断开连接
Connecting: 1, // 正在连接
Connected: 2, // 已经连接;
};


export default class NetMgr extends Component {
public static Instance: NetMgr = null as unknown as NetMgr;

private url: string = null as unknown as string;
private state: number = State.Disconnected;
private sock: WebSocket|null = null as unknown as WebSocket;

onLoad() {
if (NetMgr.Instance === null) {
NetMgr.Instance = this;
}
else {
this.destroy();
return;
}

this.state = State.Disconnected;
}
......

人才:
要求熟悉netty和cocos creater

参考:
辅助解决bug
合作方式:
按次数合作

发布方信用行为

发布项目 1
订单总数 0
退款单数 0

完善简历

工程师完善技术能力和项目经验,更易接到订单

完善人才简历

发布任务

企业点击发布任务,工程师会在任务下报名,招聘专员也会在 1 小时内与您联系确认。
该职位已结束,当前不可继续投递。
已完成