Home
last modified time | relevance | path

Searched refs:sockfd (Results 1 – 2 of 2) sorted by relevance

/DragonOS-0.1.8/user/apps/http_server/
Dmain.c30 ssize_t send_response(int sockfd, char *response) in send_response() argument
32 return write(sockfd, response, strlen(response)); in send_response()
35 void send_header(int sockfd, int content_length, char *path) in send_header() argument
69 send_response(sockfd, buffer); in send_header()
72 void send_file(int sockfd, char *path) in send_file() argument
80 sockfd, in send_file()
89 send_header(sockfd, content_length, path); in send_file()
103 int wsize = write(sockfd, p, min(readSize, MAX_RESPONSE_SIZE)); in send_file()
118 void handle_request(int sockfd, char *request) in handle_request() argument
131 …send_response(sockfd, "HTTP/1.1 400 Bad Request\nContent-Type: text/html\n\n<html><body><h1>400 Ba… in handle_request()
[all …]
/DragonOS-0.1.8/user/apps/test_relibc/
Dmain.c195 int sockfd, len = 0; in udp_client() local
200 if ((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) in udp_client()
213 sendto(sockfd, logo, sizeof(logo), 0, (struct sockaddr *)&addr, addr_len); in udp_client()
225 sendto(sockfd, buffer, len, 0, (struct sockaddr *)&addr, addr_len); in udp_client()
228 len = recvfrom(sockfd, buffer, sizeof(buffer), 0, (struct sockaddr *)&addr, &addr_len); in udp_client()