I am working on making a simple HTTP server and I am having some problems getting it to connect properly. The relevant code is below. Winsock1 is a winsock control located on Form1, which is the startup object of the project.
VB Code:
Option Explicit Private Sub Form_Load() Winsock1.LocalPort = 80 Winsock1.Listen End Sub Private Sub Winsock1_ConenctionRequest(ByVal requestID As Long) Winsock1.Close Winsock1.Accept requestID MsgBox "Hello" End Sub
When I open http://*.*.*.* from a browser (where *.*.*.* represents my computer's IP address), I get the message box notification as desired and expected. If however I get a friend to go to http://*.*.*.* nothing happens. My friend also reports that browser times out trying to connect.
At first I thought that the firewall was the problem, but I have disabled Windows Firewall (I am running XP SP2 by the way). My IP address responds to pings, but I get no message box when my friend tries to connect on port 80.
Can anyone help me?




Reply With Quote