根据stackoverflow的答案:

原文:A socket represents a single connection between two network applications. These two applications nominally run on different computers, but sockets can also be used for interprocess communication on a single computer. Applications can create multiple sockets for communicating with each other. Sockets are bidirectional, meaning that either side of the connection is capable of both sending and receiving data. Therefore a socket can be created theoretically at any level of the OSI model from 2 upwards. Programmers often use sockets in network programming, albeit indirectly. Programming libraries like Winsock hide many of the low-level details of socket programming. Sockets have been in widespread use since the early 1980s. A port represents an endpoint or "channel" for network communications. Port numbers allow different applications on the same computer to utilize network resources without interfering with each other. Port numbers most commonly appear in network programming, particularly socket programming. Sometimes, though, port numbers are made visible to the casual user. For example, some Web sites a person visits on the Internet use a URL like the following:

http://www.mairie-metz.fr:8080/ In this example, the number 8080 refers to the port number used by the Web browser to connect to the Web server. Normally, a Web site uses port number 80 and this number need not be included with the URL (although it can be).

翻译:socket代表两个网络应用之间的单个连接。这两个应用通常运行在不同的电脑上,但socket也可以被用作一台电脑间不同进程间的通信。socket是双向的,这意味着连接的两边都可以发送和接受数据。这样,一个socket理论上可以在OSI模型的第二层以上的任意层建立。程序员常在网络编程中使用socket,尽管不是直接地使用。像Winsock这样的程序库隐藏了socket编程的许多底层细节。socket自从1980年代以来已经被广泛地使用。端口(port)代表端点(endpoint),通道(channel)代表网络通信。端口号允许一台电脑上的不同应用在不干涉彼此的前提下使用网络资源。端口号在网络中经常出现,特别是socket编程。虽然有时端口号对于临时用户是明显的。例如,用url访问如下网站时:

http://www.mairie-metz.fr:8080/

在这个例子中,数字8080表示被Web浏览器连接到Web服务器的端口号。一般来说,网站使用80端口,并且这个数字不需要被包括在url中(虽然也可以被包括)。

socket是什么?(翻译)的更多相关文章

  1. Socket为什么要翻译成套接字

    作者:陈振玥链接:https://www.zhihu.com/question/21383903/answer/64103663来源:知乎著作权归作者所有,转载请联系作者获得授权. 作为一条刻(wu) ...

  2. 项目笔记---Socket Error Code翻译

    前言 在项目中为了方便调试及客户反馈,需要Socket错误数字的中文解释,MSDN上只有英文版,同时也想自己学习而且方便将来更新ErrorCode的实际发生的情景,顾有此博文. MSDN:https: ...

  3. Socket编程(C语言实现):socket()函数英文翻译

    最近开始研究使用Socket API来网络编程,想着把自己的感想.感悟写下来.我发现在编程之外还有不少概念性的东西要学习.我觉得应该有以下几点吧: 1.得了解下计算机网络的基本概念,如OSI的7层模型 ...

  4. python - socket - server

    网络上关于socket的介绍文章数不胜数.自己记录下学习的点点滴滴.以供将来复习学习使用. socket中文的翻译是套接字,总感觉词不达意.简单的理解就是ip+port形成的一个管理单元.也是程序中应 ...

  5. 高性能Server---Reactor模型-----Socket

    高性能Server---Reactor模型   原文地址:http://www.ivaneye.com/2016/07/23/iomodel.html 无处不在的C/S架构 在这个充斥着云的时代,我们 ...

  6. Socket套接字

    socket编程,熟悉吧,那到底什么是socket呢?: 我们经常把socket翻译为套接字,socket是在应用层和传输层之间的一个抽象层,它把TCP/IP层复杂的操作抽象为几个简单的接口,来供应用 ...

  7. Java Socket网络编程学习笔记(一)

    0.前言 其实大概半年前就已经看过网络编程Socket的知识了(传统IO),但是因为长时间的不使用导致忘的一干二净,最近正好准备校招,又重新看了网络编程这一章, 是传统IO(BIO)相关的内容,故在此 ...

  8. http中的socket是怎么一回事

    首先我们先看一下socket的定义:是在传输层和应用层中间的一个抽象层,是实现网络通信的接口. 那么什么是传输层,什么是应用层呢?网络又是怎样通信的呢?为了弄清这两个问题,我们需要弄清一个概念TCP/ ...

  9. 【转】Python学习---Socket通信原理以及三次握手和四次挥手详解

    [原文]https://www.toutiao.com/i6566024355082404365/ 什么是Socket? Socket的中文翻译过来就是"套接字".套接字是什么,我 ...

  10. Java Web 基础(一) 基于TCP的Socket网络编程

    一.Socket简单介绍 Socket通信作为Java网络通讯的基础内容,集中了异常.I/O流模式等众多知识点.学习Socket通信,既能够了解真正的网络通讯原理,也能够增强对I/O流模式的理解. 1 ...

随机推荐

  1. hive单机安装(实战)

    hive使用与注意事项:http://blog.csdn.net/stark_summer/article/details/44222089 连接命令:beeline -n root -u jdbc: ...

  2. Ubuntu 14 中,SecureCRT、SecureFX个性化设置

    [SecureCRT 个性化设置] 打开设置路径:菜单栏 -> Opions -> Global Options -> General -> Default Session - ...

  3. PHP变量入门教程(4)PHP 的外部变量

    PHP 的外部变量 HTML 表单(GET 和 POST) 当一个表单体交给 PHP 脚本时,表单中的信息会自动在脚本中可用.有很多方法访问此信息,例如: 一个简单的 HTML 表单 <form ...

  4. linux mingling

    grep 文本搜索工具 -i 忽略大小写 -v 不显示匹配行 -c 显示符合条件的行数值 文本搜索支持正则表达式 1 2 3 cat /etc/passwd | grep root // 显示包含ro ...

  5. word20161210

    gateway / 网关 gateway account / 网关帐户 Gateway Service for NetWare / NetWare 网关服务 GDI objects / GDI 对象 ...

  6. TraceView进行性能分析

    一.TraceView概述 TraceView 是 Android 平台配备一个很好的性能分析的工具.它可以通过图形化的方式让我们了解我们要跟踪的程序的性能,并且能具体到 method. 详细内容参考 ...

  7. ASP.NET正则表达式(URL,Email)

    public static bool IsUrl(this string str)    {        if (str.IsNullOrEmpty())            return fal ...

  8. stack.sh failing giving error "g-api did not start"

    same issue i faced , tried with ./unstack.sh and ./clean.sh also but couldn't fix the issue.Followin ...

  9. MySql: show databases/tables use database desc table

    1. show databases mysql> show databases;+--------------------+| Database |+--------------------+| ...

  10. hmm

    http://www.cnblogs.com/mindpuzzle/p/3653043.html http://en.wikipedia.org/wiki/Viterbi_algorithm http ...