{"action":"created","issue":{"url":"https://api.github.com/repos/skywind3000/kcp/issues/42","repository_url":"https://api.github.com/repos/skywind3000/kcp","labels_url":"https://api.github.com/repos/skywind3000/kcp/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/skywind3000/kcp/issues/42/comments","events_url":"https://api.github.com/repos/skywind3000/kcp/issues/42/events","html_url":"https://github.com/skywind3000/kcp/issues/42","id":182722509,"number":42,"title":"ikcp_send 后 output 不调用","user":{"login":"qiangxinyu","id":13347582,"avatar_url":"https://avatars2.githubusercontent.com/u/13347582?v=4","gravatar_id":"","url":"https://api.github.com/users/qiangxinyu","html_url":"https://github.com/qiangxinyu","followers_url":"https://api.github.com/users/qiangxinyu/followers","following_url":"https://api.github.com/users/qiangxinyu/following{/other_user}","gists_url":"https://api.github.com/users/qiangxinyu/gists{/gist_id}","starred_url":"https://api.github.com/users/qiangxinyu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qiangxinyu/subscriptions","organizations_url":"https://api.github.com/users/qiangxinyu/orgs","repos_url":"https://api.github.com/users/qiangxinyu/repos","events_url":"https://api.github.com/users/qiangxinyu/events{/privacy}","received_events_url":"https://api.github.com/users/qiangxinyu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-10-13T08:10:07Z","updated_at":"2017-09-13T21:14:07Z","closed_at":null,"author_association":"NONE","body":"```\n       kcp = ikcp_create(0x11223344, (__bridge void *)(self));\n\n        // 而考虑到丢包重发，设置最大收发窗口为128\n        ikcp_wndsize(kcp, 128, 128);\n\n\n        kcp->output = udp_output;\n\n        ikcp_nodelay(kcp, 1, 10, 2, 1);\n        kcp->rx_minrto = 10;\n        kcp->fastresend = 1;\n\n\nint udp_output(const char * buf, int len, ikcpcb * kcp, void * user)\n{\n    UDPSocket * socket = (__bridge UDPSocket *)(user);\n\n    [socket.udpSendSocket sendData:[NSData dataWithBytes:buf length:len] toHost:host port:port withTimeout:-1 tag:0];\n\n    printf(\" --- udp send\");\n\n    return 0;\n}\n\n\n//编码完成后发送数据\n- (void)ikcpSendData:(NSData *)data\n{\n    ikcp_update(kcp, [NSDate date].timeIntervalSince1970);\n    int a = ikcp_send(kcp, data.bytes, sizeof(data.bytes));\n    NSLog(@\" -- ikcp_send => %d\",a);\n}\n```\n"},"comment":{"url":"https://api.github.com/repos/skywind3000/kcp/issues/comments/329298876","html_url":"https://github.com/skywind3000/kcp/issues/42#issuecomment-329298876","issue_url":"https://api.github.com/repos/skywind3000/kcp/issues/42","id":329298876,"user":{"login":"peererror","id":12954109,"avatar_url":"https://avatars0.githubusercontent.com/u/12954109?v=4","gravatar_id":"","url":"https://api.github.com/users/peererror","html_url":"https://github.com/peererror","followers_url":"https://api.github.com/users/peererror/followers","following_url":"https://api.github.com/users/peererror/following{/other_user}","gists_url":"https://api.github.com/users/peererror/gists{/gist_id}","starred_url":"https://api.github.com/users/peererror/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peererror/subscriptions","organizations_url":"https://api.github.com/users/peererror/orgs","repos_url":"https://api.github.com/users/peererror/repos","events_url":"https://api.github.com/users/peererror/events{/privacy}","received_events_url":"https://api.github.com/users/peererror/received_events","type":"User","site_admin":false},"created_at":"2017-09-13T21:14:07Z","updated_at":"2017-09-13T21:14:07Z","author_association":"NONE","body":"problem is resolved the issue was with timer using the precise timer I was able resolve the problem thanks for the help .\r\nAlso are there any good parameters to decrease delay from 20ms to around 5 to 10 ms ? \r\nThanks for the hard work "}}
{"actor":{"display_login":"peererror"}}