Skip to content
New issue

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

关于Yar的数据包的问题 #121

Open
Y2Nk4 opened this issue Apr 27, 2018 · 5 comments
Open

关于Yar的数据包的问题 #121

Y2Nk4 opened this issue Apr 27, 2018 · 5 comments

Comments

@Y2Nk4
Copy link

Y2Nk4 commented Apr 27, 2018

我打算研究弄一个其他语言的服务端用于远程调用,但是在开发的时候发现,拦截到的Yar数据包的包头里有一大截是空的。
但是header之后的packager_name和body又能正确获取
tim 20180426225904

@Y2Nk4
Copy link
Author

Y2Nk4 commented Apr 27, 2018

Yar_Version: 2.0.4

@Y2Nk4
Copy link
Author

Y2Nk4 commented Apr 27, 2018

用Yar_Client发出的请求
<?php
$client = new Yar_Client("http://192.168.1.3:8001/Yar");
//$client = new Yar_Client("http://192.168.1.16/Yar/server.php");
$client->SetOpt(YAR_OPT_HEADER, array("version: 1")); //Custom headers, Since 2.0.4
$result = $client->some_method("parameter");
var_dump($result);

@hanskorg
Copy link

hanskorg commented Jun 7, 2018

看起来没有问题啊,看一下readme 协议header部分除最后一个int其他部分可空

@Y2Nk4
Copy link
Author

Y2Nk4 commented Jun 7, 2018

之后再折腾了一下就好了,一大截头内容确实是空的,然后还有个问题就是用nodejs的buffer把最后一个转为数字的时候一直乱码233,还在研究233

@hanskorg
Copy link

hanskorg commented Jun 8, 2018

字节序,长度,你看一下packager.c,body_len使用uint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants