winsock模拟反馈http出问题
vb吧
全部回复
仅看楼主
吧务
level 13
l4m2 楼主
Private Sub Winsock2_DataArrival(Index As Integer, ByVal bytesTotal As Long)
Debug.Print "Link " & Index & " recieved " & bytesTotal & " bytes at " & GetTickCount & ":"
Dim str$
With Winsock2(Index)
.GetData str
Debug.Print str
Debug.Print "--------"
'.Close
.SendData Text1
.Close
End With
'Unload Winsock2(Index)
End Sub
其中Text1 =
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Date: Thu,08 Mar 200707:17:51 GMT
Connection: Keep-Alive
Content-Length: 23330
Content-Type: text/html
Expries: Thu,08 Mar 2007 07:16:51 GMT
Set-Cookie: ASPSESSIONIDQAQBQQQB=BEJCDGKADEDJKLKKAJEOIMMH; path=/
Cache-control: private
//资源内容省略
链接后,立即窗口确实出现了请求,但浏览器提示“没有反应”
2015年04月25日 03点04分 1
吧务
level 13
l4m2 楼主
改成这个也不行
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Date: Thu,08 Mar 200707:17:51 GMT
Connection: Keep-Alive
Content-Length: 10
Content-Type: text/html
Expries: Thu,08 Mar 2007 07:16:51 GMT
Set-Cookie: ASPSESSIONIDQAQBQQQB=BEJCDGKADEDJKLKKAJEOIMMH; path=/
Cache-control: private
1111111111111111111111111111
2015年04月25日 03点04分 2
level 10
.SendData "test<p>line2"
2015年04月25日 04点04分 4
1