/AliOS-Things-master/components/amp_adapter/include/ |
A D | aos_socket.h | 43 int aos_socket_send(int sockfd, const void *data, size_t size, int flags); 55 int aos_socket_recv(int sockfd, void *mem, size_t len, int flags); 67 int aos_socket_write(int sockfd, const void *data, size_t size); 78 int aos_socket_read(int sockfd, void *data, size_t len); 121 int aos_socket_setsockopt(int sockfd, int level, int optname, const void *optval, socklen_t optlen); 135 int aos_socket_getsockopt(int sockfd, int level, int optname, void *optval, socklen_t *optlen); 147 int aos_socket_connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen); 159 int aos_socket_bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen); 170 int aos_socket_listen(int sockfd, int backlog); 182 int aos_socket_accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen); [all …]
|
A D | aos_udp.h | 89 int aos_udp_close_without_connect(int sockfd); 99 int aos_udp_joinmulticast(int sockfd, 110 int aos_udp_recvfrom(int sockfd, 124 int aos_udp_sendto(int sockfd,
|
/AliOS-Things-master/components/lwip/example/ |
A D | udp_test.c | 16 int sockfd; in udp_server_task() local 19 sockfd = lwip_socket(AF_INET,SOCK_DGRAM,0); in udp_server_task() 21 if (sockfd < 0) { in udp_server_task() 29 int ret=lwip_bind(sockfd,(struct sockaddr*)&svraddr,sizeof(svraddr)); in udp_server_task() 32 close(sockfd); in udp_server_task() 40 int recv_len = lwip_recvfrom(sockfd, buf, BUFSIZE, 0, (struct sockaddr*)&cli, &len); in udp_server_task() 48 lwip_close(sockfd); in udp_server_task() 54 int sockfd=lwip_socket(AF_INET,SOCK_DGRAM,0); in udp_client_task() local 58 if (sockfd < 0) { in udp_client_task() 69 len = lwip_sendto(sockfd,buf,strlen(buf),0,(struct sockaddr*)&svraddr,sizeof(svraddr)); in udp_client_task() [all …]
|
/AliOS-Things-master/components/lwip/lwip2.0.0/apps/sendfile/ |
A D | sendfile.c | 79 int fd, sockfd; in sendfile_client() local 131 if(sockfd < 0) { in sendfile_client() 141 lwip_close(sockfd); in sendfile_client() 149 lwip_close(sockfd); in sendfile_client() 158 lwip_close(sockfd); in sendfile_client() 164 lwip_close(sockfd); in sendfile_client() 172 lwip_close(sockfd); in sendfile_client() 189 lwip_close(sockfd); in sendfile_client() 243 if (sockfd == -1) { in sendfile_server_thread() 355 if(sockfd != -1) { in sendfile_server_thread() [all …]
|
/AliOS-Things-master/components/linkkit/include/linkkit/wrappers/ |
A D | wrappers_udp.h | 18 int HAL_UDP_close_without_connect(intptr_t sockfd); 20 int HAL_UDP_joinmulticast(intptr_t sockfd, char *p_group); 22 int HAL_UDP_recvfrom(intptr_t sockfd, struct _network_addr_t *p_remote, 26 int HAL_UDP_sendto(intptr_t sockfd, struct _network_addr_t *p_remote,
|
/AliOS-Things-master/components/linkkit/wrappers/platform/os/ |
A D | HAL_UDP_yoc.c | 81 int HAL_UDP_close_without_connect(_IN_ intptr_t sockfd) in HAL_UDP_close_without_connect() argument 83 return close((int)sockfd); in HAL_UDP_close_without_connect() 250 int HAL_UDP_connect(_IN_ intptr_t sockfd, _IN_ const char *host, in HAL_UDP_connect() argument 277 if (0 == connect(sockfd, ainfo->ai_addr, ainfo->ai_addrlen)) { in HAL_UDP_connect() 288 int HAL_UDP_recvfrom(intptr_t sockfd, NetworkAddr *p_remote, in HAL_UDP_recvfrom() argument 303 socket_id = (int)sockfd; in HAL_UDP_recvfrom() 341 int HAL_UDP_sendto(intptr_t sockfd, const NetworkAddr *p_remote, in HAL_UDP_sendto() argument 353 socket_id = (int)sockfd; in HAL_UDP_sendto() 369 int HAL_UDP_joinmulticast(intptr_t sockfd, char *p_group) in HAL_UDP_joinmulticast() argument 380 socket_id = (int)sockfd; in HAL_UDP_joinmulticast()
|
/AliOS-Things-master/components/linkkit/wrappers/os/ |
A D | HAL_UDP_rhino.c | 88 int HAL_UDP_close_without_connect(_IN_ intptr_t sockfd) in HAL_UDP_close_without_connect() argument 90 return close((int)sockfd); in HAL_UDP_close_without_connect() 257 int HAL_UDP_connect(_IN_ intptr_t sockfd, _IN_ const char *host, in HAL_UDP_connect() argument 284 if (0 == connect(sockfd, ainfo->ai_addr, ainfo->ai_addrlen)) { in HAL_UDP_connect() 295 int HAL_UDP_recvfrom(intptr_t sockfd, struct _network_addr_t *p_remote, in HAL_UDP_recvfrom() argument 310 socket_id = (int)sockfd; in HAL_UDP_recvfrom() 348 int HAL_UDP_sendto(intptr_t sockfd, struct _network_addr_t *p_remote, in HAL_UDP_sendto() argument 360 socket_id = (int)sockfd; in HAL_UDP_sendto() 376 int HAL_UDP_joinmulticast(intptr_t sockfd, char *p_group) in HAL_UDP_joinmulticast() argument 387 socket_id = (int)sockfd; in HAL_UDP_joinmulticast()
|
/AliOS-Things-master/components/sntp/src/ |
A D | sntp.c | 211 int sockfd = -1; in sntp_query_server() local 254 sockfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); in sntp_query_server() 255 if (sockfd < 0) { in sntp_query_server() 262 if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(int)) != 0) { in sntp_query_server() 271 if (setsockopt(sockfd, SOL_SOCKET, SO_RCVTIMEO, &timeout_val, sizeof(struct timeval)) != 0) { in sntp_query_server() 288 …ret = sendto(sockfd, &packet, sizeof(packet), 0, (struct sockaddr *)&server_addr, sizeof(server_ad… in sntp_query_server() 295 ret = recvfrom(sockfd, &packet, sizeof(packet), 0, NULL, NULL); in sntp_query_server() 323 if (sockfd >= 0) in sntp_query_server() 324 close(sockfd); in sntp_query_server()
|
/AliOS-Things-master/components/amp_adapter/platform/aos/network/ |
A D | aos_udp.c | 181 int aos_udp_close_without_connect(int sockfd) in aos_udp_close_without_connect() argument 183 return close((int)sockfd); in aos_udp_close_without_connect() 186 int aos_udp_recvfrom(int sockfd, aos_networkAddr *p_remote, in aos_udp_recvfrom() argument 201 socket_id = (int)sockfd; in aos_udp_recvfrom() 239 int aos_udp_sendto(int sockfd, const aos_networkAddr *p_remote, in aos_udp_sendto() argument 251 socket_id = (int)sockfd; in aos_udp_sendto() 268 int aos_udp_joinmulticast(int sockfd, char *p_group) in aos_udp_joinmulticast() argument 279 socket_id = (int)sockfd; in aos_udp_joinmulticast()
|
/AliOS-Things-master/components/lwip/lwip2.0.0/apps/iperf/ |
A D | iperf_task.c | 160 int sockfd; in iperf_udp_run_server() local 273 lwip_close(sockfd); in iperf_udp_run_server() 447 lwip_close( sockfd ); in iperf_udp_run_server() 645 int sockfd; in iperf_tcp_run_client() local 758 lwip_close( sockfd ); in iperf_tcp_run_client() 769 nbytes = lwip_send( sockfd, buffer, win_size, 0 ); in iperf_tcp_run_client() 807 lwip_close( sockfd ); in iperf_tcp_run_client() 821 int sockfd; in iperf_udp_run_client() local 967 lwip_close( sockfd ); in iperf_udp_run_client() 1070 nbytes = lwip_send( sockfd, buffer, data_size, 0 ); in iperf_udp_run_client() [all …]
|
/AliOS-Things-master/components/netmgr/activation/ |
A D | activation.c | 274 int sockfd = -1; in activation_report() local 304 sockfd = (int) socket(cur->ai_family, cur->ai_socktype, in activation_report() 306 if (sockfd < 0) { in activation_report() 311 if (connect( sockfd, cur->ai_addr, (int)cur->ai_addrlen) == 0 ) { in activation_report() 316 close(sockfd); in activation_report() 325 ret = send(sockfd, g_report_http_data, strlen(g_report_http_data), 0); in activation_report() 328 close( sockfd ); in activation_report() 333 if((ret = recv(sockfd, g_response_data, sizeof(g_response_data), 0)) == -1) { in activation_report() 366 close( sockfd ); in activation_report()
|
/AliOS-Things-master/components/init/ |
A D | aos_init.c | 109 int sockfd = socket(AF_INET, SOCK_DGRAM, 0); in udp_cmd() local 110 if (sockfd < 0) { in udp_cmd() 115 int ret = sendto(sockfd, argv[3], strlen(argv[3]), 0, in udp_cmd() 121 close(sockfd); in udp_cmd()
|
/AliOS-Things-master/components/amp/services/app_mgr/ |
A D | app_mgr.c | 425 int sockfd = 0; in apppack_download() local 460 sockfd = aos_tcp_establish(host_addr, port); in apppack_download() 461 if (sockfd < 0) { in apppack_download() 478 send = aos_tcp_write(sockfd, http_buffer + totalsend, in apppack_download() 500 nbytes = aos_tcp_read(sockfd, http_buffer, OTA_BUFFER_MAX_SIZE - 1, 3000); in apppack_download() 509 if (sockfd < 0) { in apppack_download() 572 amp_debug(MOD_STR, "DOWNLOAD_END, sockfd: %d ", sockfd); in apppack_download() 573 aos_tcp_destroy(sockfd); in apppack_download() 574 amp_debug(MOD_STR, "upgrade_socket_close, sockfd: %d ", sockfd); in apppack_download()
|
/AliOS-Things-master/components/http/src/ |
A D | http_aos_wrapper.c | 124 int sockfd = client->socket; in http_tcp_recv_wrapper() local 131 FD_SET(sockfd, &sets); in http_tcp_recv_wrapper() 133 select_ret = select(sockfd + 1, &sets, NULL, NULL, &timeout); in http_tcp_recv_wrapper() 136 if (0 == FD_ISSET(sockfd, &sets)) { in http_tcp_recv_wrapper() 142 ret = recv(sockfd, buf + readLen, buflen - readLen, 0); in http_tcp_recv_wrapper()
|
/AliOS-Things-master/components/linksdk/portfiles/aiot_port/ |
A D | aos_port.c | 380 int32_t sockfd; in _core_sysdep_network_udp_server_establish() local 384 sockfd = socket(AF_INET, SOCK_DGRAM, 0); in _core_sysdep_network_udp_server_establish() 385 if (sockfd < 0) { in _core_sysdep_network_udp_server_establish() 391 if (0 != setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &opt_val, sizeof(opt_val))) { in _core_sysdep_network_udp_server_establish() 394 close(sockfd); in _core_sysdep_network_udp_server_establish() 403 if (-1 == bind(sockfd, (struct sockaddr *)&servaddr, sizeof(struct sockaddr_in))) { in _core_sysdep_network_udp_server_establish() 404 printf("bind(%d) falied, errno: %d\n", (int)sockfd, errno); in _core_sysdep_network_udp_server_establish() 406 close(sockfd); in _core_sysdep_network_udp_server_establish() 410 network_handle->fd = sockfd; in _core_sysdep_network_udp_server_establish() 411 printf("success to establish udp, fd=%d\n", (int)sockfd); in _core_sysdep_network_udp_server_establish()
|
/AliOS-Things-master/hardware/chip/haas1000/drivers/rtos/rhino/kernel/include/network/curl/ |
A D | multi.h | 410 curl_socket_t sockfd, void *sockp);
|