Lines Matching refs:sockfd
30 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()
138 …send_response(sockfd, "HTTP/1.1 400 Bad Request\nContent-Type: text/html\n\n<html><body><h1>400 Ba… in handle_request()
161 sockfd, in handle_request()
165 send_file(sockfd, path); in handle_request()
169 …send_response(sockfd, "HTTP/1.1 501 Not Implemented\nContent-Type: text/html\n\n<html><body><h1>50… in handle_request()