Forum Moderators: open

Message Too Old, No Replies

Running a win32 application in port 80

Create a server that listens to port 80

         

digi_mind

9:09 pm on Nov 1, 2003 (gmt 0)

10+ Year Member



I have created a program that listens to port 6180, it is the "server".

I would like to start my "server" listening to port 80, but I get an error message when I run the program.

Is there a function or something that I can incluse in my code, do the "server" will start listening to port 80?

RobinC

9:57 pm on Nov 1, 2003 (gmt 0)

10+ Year Member



Would be helpful if you actually said *what* error message...

Chances are it's complaining something else is already using that port - try and connecto to yourself via telnet on port 80 ( telnet://127.0.0.1:80 ), if it connects, then that's your problem - find and remove the service running on that port (chances are it's a webserver)...

Robin

digi_mind

10:07 pm on Nov 1, 2003 (gmt 0)

10+ Year Member



When I typed "telnet://127.0.0.1:80" in the explorer bar, then a black window appeared, but it was empty.

I am not running a web server or any other program that I know of that could be listening to that port.

I create a simple program using Borland Builder C++, but when I start the app. then I get the error message.

I am actually trying to do this:

- Create a simple program that is going to be installed in two different computers.
- I type "hello" in one computer and the other one responds "I got your message".
- It should be done through port 80, because this two computers are in different locations, and each of them is behind a firewall.

Any idea, any simple source code?

Xoc

2:41 am on Nov 2, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Create a DOS window, then type:

netstat -a -n

It will show what ports are currently in use. If port 80 is in use, then you do have something, probably IIS, listening on that port.

digi_mind

7:25 pm on Nov 2, 2003 (gmt 0)

10+ Year Member



I typed what you told me: netstat -a-n

I got a list of many programs listening to different ports. One of the items in the list says:

TCP 0.0.0.0:80 ... and something else.

I believe this one is the one on that port, then how do I should this down so my program can work, or is it possible to use the one already lisnening in my port?