none
TCP/IP port questions RRS feed

  • Question

  • Im using Socket over TCP/IP

    1> How do i find how many maximum connections are allowed on a particular port?

    2> How do i which port is currently being used?

    3>Is it possible to increase  maximum number of connections for a port? How?( not using C# code)

    Tuesday, February 26, 2013 3:58 PM

Answers

  • On 2/26/2013 10:58 AM, lax4u wrote:

    Im using Socket over TCP/IP

    1> How do i find how many maximum connections are allowed on a particular port?

    That's based on how many concurrent connections that WCF will allow at one time, which is configurable. It also depends on how many concurrent connection the Windows O/S will allow. For Windows workstation it's 10 concurrent connections, and for a Windows server, it is based on what type of license was purchased for concurrent connections usage.


    2> How do i which port is currently being used?

    That would be based on the port the service was listening on,  which was programmed by you to listen on a particular port. Some ports are reserved 0-1023 are reserved. Ports above 1023 can be reserved for a particular application, like the SQL Server port is 1432 I believe.


    3>Is it possible to increase  maximum number of connections for a port? How?( not using C# code)

    Ports don't have a maximum connection limited, and an application does have a concurrent concurrent limitation, like a WCF service. In addition, the O/S has a concurrent connection limitation.

    Tuesday, February 26, 2013 5:17 PM
  • You can find out which ports arre being used by typing the following intoa cmd.exe

    Netstat -a

    The Net Library doesn't have a limitation on the number of connections on a port.  Your VS application determines the number of connections unless you have a firewall or virus checker that sets the limitation.


    jdweng

    Monday, March 4, 2013 10:42 AM

All replies

  • On 2/26/2013 10:58 AM, lax4u wrote:

    Im using Socket over TCP/IP

    1> How do i find how many maximum connections are allowed on a particular port?

    That's based on how many concurrent connections that WCF will allow at one time, which is configurable. It also depends on how many concurrent connection the Windows O/S will allow. For Windows workstation it's 10 concurrent connections, and for a Windows server, it is based on what type of license was purchased for concurrent connections usage.


    2> How do i which port is currently being used?

    That would be based on the port the service was listening on,  which was programmed by you to listen on a particular port. Some ports are reserved 0-1023 are reserved. Ports above 1023 can be reserved for a particular application, like the SQL Server port is 1432 I believe.


    3>Is it possible to increase  maximum number of connections for a port? How?( not using C# code)

    Ports don't have a maximum connection limited, and an application does have a concurrent concurrent limitation, like a WCF service. In addition, the O/S has a concurrent connection limitation.

    Tuesday, February 26, 2013 5:17 PM
  • Well i wanted to know which port is already being used by other services so i can make sure that my service is not using the same port.

    You are saying "O/S has a concurrent connection limitation", how do i find that limitation? 

    Also "an application does have a concurrent concurrent limitation, like a WCF service.", when we write WCF service, usually we do not set any limitation on concurrent connections, how do i find that if there is any default limitation

    Monday, March 4, 2013 4:38 AM
  • You can find out which ports arre being used by typing the following intoa cmd.exe

    Netstat -a

    The Net Library doesn't have a limitation on the number of connections on a port.  Your VS application determines the number of connections unless you have a firewall or virus checker that sets the limitation.


    jdweng

    Monday, March 4, 2013 10:42 AM
  • On 3/3/2013 11:38 PM, lax4u wrote:

    Well i wanted to know which port is already being used by other services so i can make sure that my service is not using the same port.

    <http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.txt>

    Stay away form low port numbers that's ports 0-1023. Anything above 1023 you can use that are not already being used by other applications running on the machine. If the application is not running on the machine for the high port it may be using, then you can use the ports. There are over 66535 ports something like that, so  pick one of them 200K range as an example


    You are saying/"O/S has a concurrent connection limitation"/, how do i find that limitation?

    I think the max is 10 for Windows workstations. I suggest you use Bing or Google to look it up.


    Also/"an application does have a concurrent concurrent limitation, like a WCF service."/, when we write WCF service, usually we do not set any limitation on concurrent connections, how do i find that if there is any default limitation

    The default is 5, but you can use Bing or Google to find out how to change the settings.

    Monday, March 4, 2013 10:56 AM