Home
last modified time | relevance | path

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

/DragonOS/user/apps/http_server/
H A 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 …]