开发者

iPhone does not receive UDP data over WiFi

With a WiFi connection, UDP data is not received. It开发者_Python百科 stops at:

recvfrom(sock, buf, RECV_BUF_SIZE, 0, (SOCKADDR*)&rAddr, (SOCK_LEN*)&len);

When I run the same program in iPhone simulator over ethernet it works well. What am I missing?


Look at the man page.

Like so:

  recvfrom(mSock,recvBuff,1024,0,(struct sockaddr *)&from, &fromlen);

providing the parameter values you are setting are correct try this in your case try:

  recvfrom(sock, buf, RECV_BUF_SIZE, 0, (struct sockaddr *)&rAddr, &len);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜