NetTalk Central

Author Topic: NetSimpleClientServer - can they run on different ports?  (Read 10681 times)

Wolfgang Orth

  • Sr. Member
  • ****
  • Posts: 251
    • View Profile
    • oData Wolfgang Orth
NetSimpleClientServer - can they run on different ports?
« on: December 04, 2013, 10:06:16 PM »
Hello Bruce,

can a SimpleServer run on port 1,000 while the SimpleClients send their requests by using Port 80?

It was my perception that both parties have to communicate on the same port.

I am going to test this now, but I thought I better ask for confirmation, because my test may lead my wrong though.

Thanks,
Wolfgang

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NetSimpleClientServer - can they run on different ports?
« Reply #1 on: December 05, 2013, 04:45:45 AM »
clients connect to an IP / Port combination.
That is is the IP and Port which the server is listening on.

So no, a client can't connect to port 80 if the program is listening on port 100.

Cheers
Bruce

Wolfgang Orth

  • Sr. Member
  • ****
  • Posts: 251
    • View Profile
    • oData Wolfgang Orth
Re: NetSimpleClientServer - can they run on different ports?
« Reply #2 on: December 05, 2013, 06:34:36 AM »
My question was misleading the way I asked, due to my own lack of knowledge. Sorry for that Bruce!

> can a SimpleServer run on port 1,000 while the SimpleClients send their requests by using Port 80?

My intention was:

Server: 1.2.3.4:1000

Client: is not tied to any port, is just sends an MyClient.OPEN('1.2.3.4', '1000').

So, the client would not be blocked by a firewall for connection to 1.2.3.4:1000 just because of the unusual port.

But, it may be blocked because the MyClient.EXE is not allowed to connect to the Internet. But other than that, it should work?

That was my intention to ask.

Thanks for your patience,
Wolfgang

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NetSimpleClientServer - can they run on different ports?
« Reply #3 on: December 05, 2013, 11:38:26 PM »
>> So, the client would not be blocked by a firewall for connection to 1.2.3.4:1000 just because of the unusual port.

not by default - but of course network administrators can block anything they like...

cheers
Bruce