server socket listens on a single port. All established client connections on that server are associated with that same listening port on the server side of the connection. An established connection is uniquely identified by the combination of client-side and server-side IP/Port pairs. Multiple connections on the same server can share the same server-side IP/Port pair as long as they are associated with different client-side IP/Port pairs, and the server would be able to handle as many clients as available system resources allow it to.

On the client-side, it is common practice for new outbound connections to use a random client-side port, in which case it is possible to run out of available ports if you make a lot of connections in a short amount of time.

来自:http://stackoverflow.com/questions/11129212/tcp-two-different-sockets-sharing-a-port

TCP : two different sockets sharing a port?的更多相关文章

  1. 服务器开发基础-Tcp/Ip网络模型—完成端口(Completion Port)模型

    本文对于初学网络编程的极为友好,文中所有代码全部基于C语言实现,文中见解仅限于作者对于完成端口的初步认识,由于作者才疏学浅,出现的错误和纰漏,麻烦您一定要指出来,咱们共同进步.谢谢!!! 完成端口(c ...

  2. sqlplus sys/system@'(description=(address_list=(address=(protocol=tcp)(host=192.168.11.199)(port=1521)))(connect_data=(service_name=byRuiy)))' as sysdba

  3. TCP server 为什么一个端口可以建立多个连接?

    https://segmentfault.com/q/1010000003101541 如果是tcp client用同一个本地端口去连不同的两个服务器ip,连第二个时就会提示端口已被占用.但服务器的监 ...

  4. Introduction Sockets to Programming in C using TCP/IP

    Introduction Computer Network: hosts, routers, communication channels Hosts run applications Routers ...

  5. TCP常用网络和木马使用端口对照表,常用和不常用端口一览表

    [开始-运行- CMD , 输入 netstat -an 然后回车就可以查看端口] 端口: 服务:Reserved 说明:通常用于分析操作系统.这一方法能够工作是因为在一些系统中“”是无效端口,当你试 ...

  6. TCP/UDP端口列表

    http://zh.wikipedia.org/wiki/TCP/UDP%E7%AB%AF%E5%8F%A3%E5%88%97%E8%A1%A8 TCP/UDP端口列表     本条目可通过翻译外语维 ...

  7. 通过PowerShell发送TCP请求

    很多时候我们需要通过Socket发送特定的TCP请求给服务器的特定端口来实现探测服务器的指定端口所开启的服务.很多语言都有相应的方法实现上述需求,当然,PowerShell也不例外,比如我们要发送一个 ...

  8. TCP connection status

    A TCP connection progresses through a series of states during its lifetime. The following diagram il ...

  9. How To: Perl TCP / UDP Socket Programming using IO::Socket::INET

    http://www.thegeekstuff.com/2010/07/perl-tcp-udp-socket-programming/ In this article, let us discuss ...

随机推荐

  1. 第一个jsp代码实现简单计算器

    a.新建mycal.Jsp,把简单计算机的框架写出来: <form action="myresult.jsp"> 请输入第一个数:<input type=&quo ...

  2. C# 基础(5)--字符串

    Params 可变参数,只能修饰数组,可以传递数组,也可以传递数组的元素. 要抛弃一个异常,可以这样写: Throe new exeception?? 命名空间 不在同一个命名空间下的类,不同直接访问 ...

  3. (Unity)Unity自定义Debug日志文件,利用VS生成Dll文件并使用Dotfuscated进展混淆,避免被反编译

    Unity自定义Debug日志文件,利用VS生成Dll文件并使用Dotfuscated进行混淆,避免被反编译. 1.打开VS,博主所用版本是Visual Studio 2013. 2.新建一个VC项目 ...

  4. 【kd-tree】bzoj2648 SJY摆棋子

    #include<cstdio> #include<cmath> #include<algorithm> using namespace std; #define ...

  5. CCF 201612-2 火车购票 (暴力)

    问题描述 请实现一个铁路购票系统的简单座位分配算法,来处理一节车厢的座位分配. 假设一节车厢有20排.每一排5个座位.为方便起见,我们用1到100来给所有的座位编号,第一排是1到5号,第二排是6到10 ...

  6. ORACLE_簽核PROC帶游標

    CREATE OR REPLACE PROCEDURE SP_C_TXYYMM(VAPPLY_NO IN VARCHAR2,VUSER_NM IN VARCHAR2,VFAC_NO IN VARCHA ...

  7. 自己动手写UI库——引入ExtJs(布局)

    第一: 来看一下最终的效果 第二: 来看一下使用方法: 第三: Component类代码如下所示: public class Component     {                   pub ...

  8. Android开源项目分包方式学习(eoe、oschina、github)

    总感觉Android中关于分包的文章很少,或者几乎可以说没有.但是合理地分包,又可以使整个项目模块化,减少包与包之间的依赖,让整个项目的框架更加清晰,更利于后续功能的拓展. 因为没有相关的文章,所以这 ...

  9. Spring依赖注入(IOC)那些事

    小菜使用Spring有几个月了,但是对于它的内部原理,却是一头雾水,这次借着工作中遇到的一个小问题,来总结一下Spring. Spring依赖注入的思想,就是把对象交由Spring容器管理,使用者只需 ...

  10. 安装完grunt和grunt-cli仍然无法识别grunt

    如题: 在安装完grunt-cli和grunt之后,仍然不识别grunt. 反复确认是-g安装... 原因: 有可能是nodejs安装出现问题,到时npm的路径没有出现在环境变量里面. 把C:\Use ...