We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我在我的代码中使用OkSocket,但是能够接收到另一端的数据包,却无法发送一个查询包。 我的协议定义如下:
@Override public int getHeaderLength() { return HEADER_LENGTH; } @Override public int getBodyLength(byte[] header, ByteOrder byteOrder) { return ((header[4]&0xFF) | ((header[5]<<8) & 0xFF00)); }
我的发送数据包定义如下:
public CPNQueryTask(String param){ this.param = param; } public String getParam() { return param; } public void setParam(String param) { this.param = param; } @Override public byte[] parse() { byte[] queryBytes = FrameUtil.getQueryBytes(param); return queryBytes; } @Override public String toString() { return FrameUtil.bytes2Hex(FrameUtil.getQueryBytes(param)); }
我在OkSocket的回调函数onSocketWriteResponse中输出日志, 在执行CPNQueryTask task = new CPNQueryTask("0x00000310"); manager.send(task);时,正常onSocketWriteResponse方法会被调用,但是他没有显示日志,没有调用, 在数据包的parse方法中进行日志输出,发现这个方法并没有被调用。
CPNQueryTask task = new CPNQueryTask("0x00000310"); manager.send(task);
The text was updated successfully, but these errors were encountered:
可以加一下群,我们一起看下这个
Sorry, something went wrong.
No branches or pull requests
我在我的代码中使用OkSocket,但是能够接收到另一端的数据包,却无法发送一个查询包。
我的协议定义如下:
我的发送数据包定义如下:
我在OkSocket的回调函数onSocketWriteResponse中输出日志,
在执行
CPNQueryTask task = new CPNQueryTask("0x00000310"); manager.send(task);
时,正常onSocketWriteResponse方法会被调用,但是他没有显示日志,没有调用,在数据包的parse方法中进行日志输出,发现这个方法并没有被调用。
The text was updated successfully, but these errors were encountered: