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

sub 失败 #51

Open
baadf opened this issue Apr 30, 2015 · 5 comments
Open

sub 失败 #51

baadf opened this issue Apr 30, 2015 · 5 comments

Comments

@baadf
Copy link

baadf commented Apr 30, 2015

  1. curl -v "http://127.0.0.1:45328/push?cname=12&content=hi"
    2.curl -v "http://127.0.0.1:45329/sub?cname=12"
    进行第2部操作的时候,获取不到content,一直是空。
@ideawu
Copy link
Owner

ideawu commented Apr 30, 2015

应该是你看错了. 请仔细看屏幕和 log.txt, 提供可以帮助你自己的准确信息.

补充, 请加上 seq 参数:

curl -v "http://127.0.0.1:45329/sub?cname=12&seq=1" 

因为响应已经告诉你了:

{"type":"next_seq","cname":"a","seq":1,"content":""}

@baadf
Copy link
Author

baadf commented May 5, 2015

seq=1可以发送和推送, seq表示什么意思?

@ideawu
Copy link
Owner

ideawu commented May 5, 2015

是客户端想要收到的下一条消息的序号, 参见wiki https://github.com/ideawu/icomet/wiki#subscribe-to-a-channel

@baadf
Copy link
Author

baadf commented May 5, 2015

seq初始值为0,怎么获取最新的一条数据

@ideawu
Copy link
Owner

ideawu commented May 5, 2015

根据返回 next_seq, 再次订阅.

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