词汇表
我们将在这里列出与 Socket.IO 生态系统相关的术语:
¥We will list here the terms that are related to the Socket.IO ecosystem:
适配器
¥Adapter
适配器是一个服务器端组件,负责:
¥An Adapter is a server-side component which is responsible for:
存储 Socket 实例和 房间 之间的关系
¥storing the relationships between the Socket instances and the rooms
向 all(或一部分)客户端广播事件
¥broadcasting events to all (or a subset of) clients
除了 Socket.IO 服务器默认包含的 内存适配器 之外,目前还有 5 个官方适配器:
¥Besides the in-memory adapter which is included by default with the Socket.IO server, there are currently 5 official adapters:
¥the Redis adapter
¥the MongoDB adapter
¥the Postgres adapter
集群适配器 号
¥the Cluster adapter
内存适配器可以扩展以添加对其他消息传递系统的支持,例如 RabbitMQ 或 Google Pub/Sub。
¥The in-memory adapter can be extended to add support for other messaging systems, like RabbitMQ or Google Pub/Sub for example.
请参阅文档 此处。
¥Please see the documentation here.
Engine.IO
Engine.IO 是 Socket.IO 的内部组件,负责建立服务器和客户端之间的底层连接。
¥Engine.IO is an internal component of Socket.IO, which is responsible for establishing the low-level connection between the server and the client.
你将找到更多信息 此处。
¥You will find more information here.
命名空间
¥Namespace
命名空间是一个允许在服务器端拆分应用逻辑的概念。
¥A Namespace is a concept that allows splitting the application logic on the server-side.
请参阅文档 此处。
¥Please see the documentation here.
房间
¥Room
Room 是一个服务器端概念,允许将数据广播到客户端的子集。
¥A Room is a server-side concept that allows broadcasting data to a subset of clients.
请参阅文档 此处。
¥Please see the documentation here.
传输
¥Transport
传输表示在服务器和客户端之间建立连接的底层方式。
¥A Transport represents the low-level way of establishing a connection between the server and the client.
目前有两种已实现的传输:
¥There are currently two implemented transports:
HTTP 长轮询
¥HTTP long-polling
请参阅文档 此处。
¥Please see the documentation here.