Option Explicit Private WithEvents k As vbRichClient5.cWebServer Private Sub Command1_Click() Set k = New cWebServer k.Listen "localhost", "127.0.0.1", 8891 End Sub Private Sub k_ConnAccepted(hSocket As Long, ClientIPAndPort As String) Debug.Print hSocket End Sub Private Sub k_ProcessRequest(Request As vbRichClient5.cWebRequest) Request.Response.SetResponseDataString "hello,world" End Sub
时间: 2024-11-13 06:18:08