本文介绍了什么是插座?是一个过程吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究操作系统的概念,我发现套接字是通信的终点.现在究竟什么是套接字?它是系统通信的过程吗?提前致谢

I am studying os concepts and I found socket as the end point of communication. Now what exactly is a socket? Is it a process through means of which a system communicates?Thanks in advance

推荐答案

通过阅读维基百科的文章,我明白你为什么会感到困惑.

From reading the Wikipedia article, I can see why you may be confused.

套接字是一个虚拟设备.也就是说,它是一种用软件编写的设备,没有物理设备.因此,您可以像在终端上一样读取和写入套接字.

A socket is a virtual device. That is, it is a device that is written in software and has no physical device. Thus, you can read to and write from a socket, like you would do to a terminal.

套接字成对工作以进行通信,并且通常是双向的.一个读取套接字 (A) 并写入套接字 (B) --- 或 ---- 写入套接字 (A) 并从套接字读取 --- 或 --- 来回切换.

Sockets work in pairs to communicate and are usually bidirectional. One reads to socket (A) and writes to socket (B) --- or ---- writes to socket (A) and reads from socket --- or --- switches back and forth.

通常套接字用于网络通信.它们通常可以支持多种协议(TPC/IP、UDP/IP,甚至 DECnet——范围取决于底层系统).

Generally sockets are used for network communications. They can usually support multiple protocols (TPC/IP, UDP/IP, even DECnet--the gamut depends upon the underlying system).

套接字也可用于单个系统上的进程间通信.

Sockets can be used for interprocess communication on a single system as well.

这篇关于什么是插座?是一个过程吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 18:10