Skip to content
This repository was archived by the owner on Jun 22, 2024. It is now read-only.

lykan commit#15

Open
likeran2234 wants to merge 1 commit intoApex-ISET:masterfrom
likeran2234:dev
Open

lykan commit#15
likeran2234 wants to merge 1 commit intoApex-ISET:masterfrom
likeran2234:dev

Conversation

@likeran2234
Copy link
Copy Markdown

创造了dev分支,对http_sever的代码进行更新

@pullapprove
Copy link
Copy Markdown

pullapprove Bot commented Nov 21, 2022

Hey @likeran2234, thanks for the PR! The review will start once
the tests and CI checks have passed.

Comment on lines +2 to +13
#include<string>
using namespace std;
void HttpProcess(string& req, string* resp)
{
string first_line = "HTTP/1.0 200 OK\n";
string body = "<html><div><h1>hello world</h1></div></html\n";
string header = "Content-Type: text/html\ncharset: gbk\nContent-Length:"
+to_string(body.size())+"\n\n";
*resp = first_line + header + body;
//service firewalld stop 关闭防火墙 #centos 7
//service firewalld status
} No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这一段代码是为了测试代码的功能能否实现吗?建议在后续的commit中放到测试文件中

Comment on lines +140 to +145
struct Arg{
TcpSocket new_sock;
string ip;
uint16_t port;
Handler handler;
};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

struct Arg是不是应该暴露给用户的定义,如果不是,建议放在TcpPthreadServer中作为私有变量。

Copy link
Copy Markdown
Contributor

@shejialuo shejialuo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

细节修改

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants