client/server compile question

Hi,
I have 2 files-->server.c and client.c
My server.c takes local ip as saying:

*.sin_addr.s_addr=INADDR_ANY;

client.c is in the same machine.It has a line like:

*.sin_addr.s_addr=inet_addr(argv[1]);

I don't know how to compile.I tried

./client 127.0.0.1 

It used port 7777 in both client and server.I think i have missed something.
But it works when I use port 80.Do you know why??

I would like to post the client.c and server.c but I know if do so
people will start giving there advice.

This is a small program.It only connects the client on server.

If it's working on one port and not on the other it means you're probably being blocked by a firewall or something. Is there any error when trying to create / connect the client / server in 7777 ? (if not, it's definitely a firewall).

Oh, if you try to bind a server in a low port ( < 1024 ) such as 80 you will need UID 0 (generally root).

Hi

Could you please tell us what is the value set for .sin_port ? This should be the port the server is listening to... and client should also have the same port set for .sin_port as like server to get connected

Regards
Collins