• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/iserver/libav-0.8.8/libavformat/

Lines Matching defs:udp_fd

46     int udp_fd;
185 int udp_fd = -1;
196 udp_fd = socket(res->ai_family, SOCK_DGRAM, 0);
197 if (udp_fd > 0) break;
201 if (udp_fd < 0)
209 return udp_fd;
212 if (udp_fd >= 0)
213 closesocket(udp_fd);
268 if (connect(s->udp_fd, (struct sockaddr *) &s->dest_addr,
300 return s->udp_fd;
308 int port, udp_fd = -1, tmp, bind_ret = -1;
370 udp_fd = udp_socket_create(s, &my_addr, &len, localaddr);
371 if (udp_fd < 0)
379 if (setsockopt (udp_fd, SOL_SOCKET, SO_REUSEADDR, &(s->reuse_socket), sizeof(s->reuse_socket)) != 0)
386 bind_ret = bind(udp_fd,(struct sockaddr *)&s->dest_addr, len);
390 if (bind_ret < 0 && bind(udp_fd,(struct sockaddr *)&my_addr, len) < 0)
394 getsockname(udp_fd, (struct sockaddr *)&my_addr, &len);
400 if (udp_set_multicast_ttl(udp_fd, s->ttl, (struct sockaddr *)&s->dest_addr) < 0)
404 if (udp_join_multicast_group(udp_fd, (struct sockaddr *)&s->dest_addr) < 0)
412 if (setsockopt(udp_fd, SOL_SOCKET, SO_SNDBUF, &tmp, sizeof(tmp)) < 0) {
420 if (setsockopt(udp_fd, SOL_SOCKET, SO_RCVBUF, &tmp, sizeof(tmp)) < 0) {
424 ff_socket_nonblock(udp_fd, 1);
427 if (connect(udp_fd, (struct sockaddr *) &s->dest_addr, s->dest_addr_len)) {
433 s->udp_fd = udp_fd;
436 if (udp_fd >= 0)
437 closesocket(udp_fd);
447 ret = ff_network_wait_fd(s->udp_fd, 0);
451 ret = recv(s->udp_fd, buf, size, 0);
461 ret = ff_network_wait_fd(s->udp_fd, 1);
467 ret = sendto (s->udp_fd, buf, size, 0,
471 ret = send(s->udp_fd, buf, size, 0);
481 udp_leave_multicast_group(s->udp_fd, (struct sockaddr *)&s->dest_addr);
482 closesocket(s->udp_fd);