试卷详情
-
初级程序员下午试题-60
-
[多项选择]【说明】
1.HTTP
◆ HTTP请求消息示例
GET/index,htmlHTTP/1.1
Accept:image/gif,image/jpeg,*/*
Accept-Language:zh-ch
Accept-encoding:gzip,deflate
User-Agent:Mozilla/4.0(compatible: MSIE6.0;Windows 2003)
Host:localhost:8080
Connection:Keep-Alive
◆ HTTP响应消息示例
HTTP/1.1 200 OK
Servert:Microsoft-IIS/6.0
Date:Mon,3 Jan 2008 13:13:33 GMT
Content-Type:text/html
Last-Modified:Mon,11 Jan 2008 13:23:42 GMT
Contelit-Length:112
<html>
...
</html>
2.相关类及主要成员函数
◆ ServerSocket类
服务器端套接字,它监听固定端口,以接收来自客户端的连接请求,一旦建立连接就返回一个Socket类型的对象,类中的主要成员函数如表6-16所示。
表6-16 ServerSocket类的主要成员函数函数名