|
|
|
@ -40,7 +40,7 @@ static struct udp_flow* flow_find(struct udp_flow* head, uint64_t client_node_id |
|
|
|
static void flow_read_cb(socket_t sock, void* arg) { |
|
|
|
static void flow_read_cb(socket_t sock, void* arg) { |
|
|
|
(void)sock; struct udp_flow* f = (struct udp_flow*)arg; |
|
|
|
(void)sock; struct udp_flow* f = (struct udp_flow*)arg; |
|
|
|
if (!f || f->sock == SOCKET_INVALID || !g_udp_ctx) return; |
|
|
|
if (!f || f->sock == SOCKET_INVALID || !g_udp_ctx) return; |
|
|
|
uint8_t buf[65536]; |
|
|
|
uint8_t buf[1600]; |
|
|
|
struct sockaddr_in from; socklen_t flen = sizeof(from); |
|
|
|
struct sockaddr_in from; socklen_t flen = sizeof(from); |
|
|
|
ssize_t n = recvfrom(f->sock, buf, sizeof(buf), 0, (struct sockaddr*)&from, &flen); |
|
|
|
ssize_t n = recvfrom(f->sock, buf, sizeof(buf), 0, (struct sockaddr*)&from, &flen); |
|
|
|
if (n <= 0) return; |
|
|
|
if (n <= 0) return; |
|
|
|
|