| View previous topic :: View next topic |
| Author |
Message |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Fri Jun 13, 2008 8:57 am Post subject: winsock question |
|
|
I'm learning winsock, creating server and client applications, and I just finished both, client application last, but there's one piece of code that puzzles me.
| Code: |
getaddrinfo(argv[1], DEFAULT_PORT, &hint, &result);
|
EDIT:
Nvm, I understand it now, you have to pass an argument through the command line for it to work. Well I still have a question, what is the port 27015 used for?
_________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Fri Jun 13, 2008 10:46 am Post subject: |
|
|
27015 is a port used in Half-Life based games for dedicated servers.
_________________
- Retired. |
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Fri Jun 13, 2008 4:51 pm Post subject: |
|
|
Ok. What port is used for things like AIM and MSN, so IMing basically. Also, would port 80 work with sending files?
_________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
HalfPrime Grandmaster Cheater
Reputation: 0
Joined: 12 Mar 2008 Posts: 532 Location: Right there...On your monitor
|
|
| Back to top |
|
 |
STN I post too much
Reputation: 43
Joined: 09 Nov 2005 Posts: 2676
|
Posted: Fri Jun 13, 2008 8:42 pm Post subject: |
|
|
You can use any port that is between 0 to 65535. So you can do file transfer as well on any you like . If its used or not, doesn't matter.
_________________
|
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Fri Jun 13, 2008 10:14 pm Post subject: |
|
|
I thought certain ports were used for certain things though?
_________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
HalfPrime Grandmaster Cheater
Reputation: 0
Joined: 12 Mar 2008 Posts: 532 Location: Right there...On your monitor
|
Posted: Fri Jun 13, 2008 10:17 pm Post subject: |
|
|
*I meant currently in use.
_________________
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Sun Jun 15, 2008 12:09 pm Post subject: |
|
|
| oib111 wrote: | | I thought certain ports were used for certain things though? |
Taken from IANA:
| Quote: | The port numbers are divided into three ranges: the Well Known Ports,
the Registered Ports, and the Dynamic and/or Private Ports.
The Well Known Ports are those from 0 through 1023.
DCCP Well Known ports SHOULD NOT be used without IANA registration.
The registration procedure is defined in [RFC4340], Section 19.9.
The Registered Ports are those from 1024 through 49151
DCCP Registered ports SHOULD NOT be used without IANA registration.
The registration procedure is defined in [RFC4340], Section 19.9.
The Dynamic and/or Private Ports are those from 49152 through 65535
A value of 0 in the port numbers registry below indicates that no port
has been allocated. |
Port Register List:
http://www.iana.org/assignments/port-numbers
_________________
- Retired. |
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Sun Jun 15, 2008 1:09 pm Post subject: |
|
|
I think I understand this now. I can use about any port I want from 0-65536. But the router filters traffic through ports, so like web traffic is filtered into port 80, so for example if you set your router to not allow traffic coming through port 80, you wouldn't be able to browse the internet or have traffic coming from a program, i.e. AIM (though I doubt it uses port 80).
_________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
|