localaddr=>'www.myserver.com',
localport=>80,
);
2.$httpd->accept 接受来自客户机连接请求,返回http::daemon::clientcoon对象
3.$httpd->url 由后台程序处理的主机和端口名 http://server:port/
4.$conn->get_request 读取来自客户机的http请求并返回一个http::request对象。能接受块传输和使用multipart/form-data编码的文档上载。一旦头 被读取就让get_request返回,然后就可以使用read_buffer来成块读数据。
5.$conn->read_buffer
6.$conn->reason 将get_request失败的原因返回
7.$conn->send_status_line 发送一个http响应状态行给客户机
eg1: $conn->send_status_line(rc_not_found);
#generate standard '404' response
eg2: $conn->send_status_line(404,“it wasn't there!“);
#eg2 has the same effect as eg1 has
8.$conn->send_file_response 试图打开,读和发送文档内容给客户机
9.$conn->send_file 试图发送传递的文档句柄内容给客户机
2.一个简单的服务器推计数器