yukixz / cqsocketapi

CoolQ Socket API written in VC++.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

新版的酷Q udp客户端好像没法接受消息

hsxin opened this issue · comments

commented

新版的酷Q udp客户端好像没法接受消息,能否改成tcp?

😱

On Mon, 21 Nov 2016 at 9:55 AM, hsxin notifications@github.com wrote:

新版的酷Q udp客户端好像没法接受消息,能否改成tcp?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#12, or mute the thread
https://github.com/notifications/unsubscribe-auth/ADLuwYdfvov9tEdLvK2-8hNMxymCMhb0ks5rAPougaJpZM4K3vNm
.

commented

我用的是java写的客户端,使用UDP调用的接受,发消息没得问题,就是没法接受到消息

commented

void APIClient::send(const char *buffer, const int len)
{
time_t timeout = time(0) - CLIENT_TIMEOUT;
char log[1024];

for (int i = 0; i < CLIENT_SIZE; i++) {
	if (clients[i].hello < 0) {
		continue;
	}
	if (clients[i].hello < timeout) {
		clients[i].hello = -1;
		sprintf_s(log, "Client removed: %d.", clients[i].port);
		CQ_addLog(appAuthCode, CQLOG_INFO, "APIClient", log);
		continue;
	}
	sendto(sock, buffer, len, 0, (sockaddr *)&clients[i].info, sizeof(clients[i].info));
}

}
😱 如果可以的话 复写一个tcp,一个写文件的,一个http回调的接口 。

tcp server 比 udp server 难写多了😞

On Mon, 21 Nov 2016 at 10:22 AM, Dazzy Ding h@dazzyd.org wrote:

你发 clienthello 了吗👀

On Mon, 21 Nov 2016 at 10:16 AM, hsxin notifications@github.com wrote:

我用的是java写的客户端,使用UDP调用的接受,发消息没得问题,就是没法接受到消息


You are receiving this because you commented.

Reply to this email directly, view it on GitHub
#12 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADLuwYi-USmo99sfb8GALiRKiuuWkKWgks5rAP8MgaJpZM4K3vNm
.

你发 clienthello 了吗👀

On Mon, 21 Nov 2016 at 10:16 AM, hsxin notifications@github.com wrote:

我用的是java写的客户端,使用UDP调用的接受,发消息没得问题,就是没法接受到消息


You are receiving this because you commented.

Reply to this email directly, view it on GitHub
#12 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADLuwYi-USmo99sfb8GALiRKiuuWkKWgks5rAP8MgaJpZM4K3vNm
.

不对呀、我检查了一下我的 python 实现是正常的。
你确认一下你的实现有没有问题👀

On Mon, 21 Nov 2016 at 10:22 AM, Dazzy Ding h@dazzyd.org wrote:

tcp server 比 udp server 难写多了😞

On Mon, 21 Nov 2016 at 10:22 AM, Dazzy Ding h@dazzyd.org wrote:

你发 clienthello 了吗👀

On Mon, 21 Nov 2016 at 10:16 AM, hsxin notifications@github.com wrote:

我用的是java写的客户端,使用UDP调用的接受,发消息没得问题,就是没法接受到消息


You are receiving this because you commented.

Reply to this email directly, view it on GitHub
#12 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADLuwYi-USmo99sfb8GALiRKiuuWkKWgks5rAP8MgaJpZM4K3vNm
.

commented

我的实现貌似没得问题,发消息正常 ,正在研究你的python robot.

commented

image

有 add 消息就会正常发送了的👀

On Mon, 21 Nov 2016 at 11:20 AM, hsxin notifications@github.com wrote:

[image: image]
https://cloud.githubusercontent.com/assets/3447075/20469652/709cad9e-afdc-11e6-8d0e-e395a6c58a20.png


You are receiving this because you commented.

Reply to this email directly, view it on GitHub
#12 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADLuwVNCBmpvOE9EVyEmWKeG6ZuQTO_Jks5rAQ3-gaJpZM4K3vNm
.

commented

image
没看到发送消息

发送不会有 log 的呀… 不然 log 会炸的

On Mon, 21 Nov 2016 at 11:24 AM, hsxin notifications@github.com wrote:

[image: image]
https://cloud.githubusercontent.com/assets/3447075/20469729/0ae0c214-afdd-11e6-9442-48ddc1086254.png
没看到发送消息


You are receiving this because you commented.

Reply to this email directly, view it on GitHub
#12 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADLuwddHyjei6eEGV4fo7QFXo_O4U1awks5rAQ74gaJpZM4K3vNm
.

😞总之我这边没有问题…
你的问题是 酷q发出到java应用这段路走不通

On Mon, 21 Nov 2016 at 11:25 AM, Dazzy Ding h@dazzyd.org wrote:

发送不会有 log 的呀… 不然 log 会炸的

On Mon, 21 Nov 2016 at 11:24 AM, hsxin notifications@github.com wrote:

[image: image]
https://cloud.githubusercontent.com/assets/3447075/20469729/0ae0c214-afdd-11e6-9442-48ddc1086254.png
没看到发送消息


You are receiving this because you commented.

Reply to this email directly, view it on GitHub
#12 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADLuwddHyjei6eEGV4fo7QFXo_O4U1awks5rAQ74gaJpZM4K3vNm
.

commented

image

commented

估计是udp不行哈

😔我这边正常就是了。我看不到你的应用也没法猜出问题在哪。