It occurs to me that I don't know how to formally define "port" in any context in which I know the word.
-
-
Nothing too magical about it. Any program can listen on any port it wants. Some ports are standardized, but doesn't stop a program from listening on those ports anyway. Like web browsers always use 80 (and redirected to 443 if https is required).
-
After that, it can be as simple as just a chat client passing plain text back and forth.
-
No I know but how do the integers map? Is it a hashmap implementation, what do they do under the hood when you specify e.g. port 8888
-
Hmm. Not sure what you mean exactly then, my apologies. It's not exactly mapping, you just tell your program what port to listen on. If you tell it to listen on 80 and point a web browser to localhost, your web browser will then be talking with your program.
-
Yes I know that but what does the 80 *do* that 79 *doesn’t*
-
Absolutely nothing :) That's the beauty. Ever use a web browser to connect to your home router on port 8080? Functionally identical to Port 80, they just use 8080 so as not to conflict with anything listening on 80
-
Yes I know this but there has to be some logic that filters by those values. Where is it and how is it implemented. # I should just read the spec
-
Each protocol has their own spec. Wanna send an email without an email client? Use telnet to connect to Port 25 on your email SMTP server. Use the smtp spec to find out what to type to send an email (usually a HELO command).
- 4 more replies
New conversation -
-
-
I'm not a pro programmer, so in this context it may be over my head. (Network/Infosec engineer). I"ll take a stab though... There are 65535 total ports in the TCP & UDP stacks. Each port/IP combo can only serve one service at a time There are a number of 'well known' ports 1/
-
Which are commonly used services and their expected bindings. These can be changed per-application. Some common TCP: 80: HTTP 443: HTTPS 25: SMTP 110: POP 22: SSH 21 & 20: FTP 23: Telnet UDP: 53: DNS 5060: SIP Googling 'well known TCP' and UDP ports will get you a good list
-
I hope this helps, but may be completely irrelevant and basic for what you're looking for. I can always try to tag in someone else :) I have resources.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.