套接字

作者: 凡择 | 来源:发表于2018-03-22 08:39 被阅读0次

非常经典的说明,可以经常看 socket与port

A TCP socket is an endpoint instance defined by an IP address and a port in the context of either a particular TCP connection or the listening state.

个人理解:

  1. 说套接字是需要上下文的。只有针对一个具体的tcp连接(不仅仅有自身的ip和端口,还有对方的ip和端口)或者监听状态(对于一个ip+port,只能由一个监听者。写程序时有时报错说端口已经被使用就是因为一个端口只能由一个监听者)时才有意义。套接字不是一个独立的概念,是必须在上述两种场景下才有意义的。

A port is a virtualisation identifier defining a service endpoint (as distinct from a service instance endpoint aka session identifier).

A TCP socket is not a connection, it is the endpoint of a specific connection.

There can be concurrent connections to a service endpoint, because a connection is identified by both its local and remote endpoints, allowing traffic to be routed to a specific service instance.

There can only be one listener socket for a given address/port combination.

相关文章

  • ss:一个统计网络和套接字信息的命令行工具

    ss简介 ss命令可以用来统计套接字信息,它支持PACKET套接字、TCP套接字、UDP套接字、DCCP套接字、R...

  • 2018-09-12 day18网络编程

    1.socket套接字 socket又叫套接字,就是进行数据通信两端。分为服务端套接字和客户端套接字 套接字编程:...

  • Mysql常用文件介绍

    套接字文件 Linux上本地连接Mysql默认采用套接字方式。套接字文件可由参数socket控制。查看套接字文件的...

  • 第十六章 网络IPC 套接字

    套接字描述 套接字是通信端点的抽象 套接字描述符:正如使用文件描述符访问文件,应用程序用套接字描述符访问套接字 套...

  • TCP/IP协议族、Socket、HTTP的知识整理

    Socket(套接字,业余计算机从业人员表示,这是什么垃圾翻译?!套接字是个什么鬼?套接就套接,什么叫套接字?)是...

  • Python基础语法-3

    socket套接字使用流程:1.创建套接字2.使用套接字收/发数据3.关闭套接字 创建一个TCP socket 创...

  • 套接字与套接字编程

    什么是套接字(Socket)? 使用端口(Port)可以标识不同的网络进程 端口使用16个bit位表示 4个字节 ...

  • Day18-总结

    01-服务端套接字 套接字又叫套接字,指的是实现通信的两个端。等待请求的一段叫服务端套接字,发送请求的叫客户端套接...

  • 第19天总结网络通信

    socket又叫套接字,实现网络通信的两端就是套接字。分为服务器对应的套接字和客户端对应的套接字 python通过...

  • Day19-网络通信

    一、socket socket又叫套接字,实现网络通信的两端就是套接字。分为服务器对应的套接字和客户端对应的套接字...

网友评论

      本文标题:套接字

      本文链接:https://www.haomeiwen.com/subject/pcpoqftx.html