用于实现自定义传输后端的API

APIs for Implementing Custom Transport Backends

用于实现自定义传输后端的API

Qt Remote Objects provides several abstract interfaces for implementing custom transport backends. The concept behind these classes is that there needs to be a host node, which has an address that can be connected to. Then there is a client object, which can be publicly constructed, and can connect to the server. When the server gets a connection request, it creates the server side of the connection, which communicates directly with the client. There are thus three abstractions, one for the server (QConnectionAbstractServer), one for the client-side of the connection (QtROClientIoDevice), and the third for the server-side of the connection (QtROServerIoDevice). The latter two inherit from QtROIoDeviceBase.

Qt远程对象提供了几个抽象接口来实现自定义传输后端。这些类背后的概念是,需要有一个主机节点,它有一个可以连接的地址。然后是一个客户端对象,它可以公开构建,并可以连接到服务器。当服务器收到连接请求时,它会创建连接的服务器端,直接与客户端通信。因此,有三个抽象,一个用于服务器(QConnectionAbstractServer),一个适用于连接的客户端(QtRClientIoDevice),第三个用于连接的服务器端(QtROServerIoDevice)。后两者继承自QtROIoDeviceBase。

API Overview

API概述

  • QtROIoDeviceBase
  • QtROClientIoDevice
  • QtROServerIoDevice
  • QConnectionAbstractServer

After implementing these interfaces, you can register your custom protocol using the qRegisterRemoteObjectsServer() and qRegisterRemoteObjectsClient() methods.

​实现这些接口后,可以使用qRegisterRemoteObjectsServer()和qRegisterRemoteObjectsClient()方法注册自定义协议。

Note: These APIs are provided to give more flexibility for implementing custom communication protocols for Qt Remote Objects. There are no source or binary compatibility guarantees for them, meaning that the API is only guaranteed to work with the Qt version it was developed against. API changes will however only be made in minor releases. (6.1, 6.2, and so on.)

注意:提供这些API是为了为Qt远程对象实现自定义通信协议提供更大的灵活性。它们没有源代码或二进制兼容性保证,这意味着API只能保证与针对其开发的Qt版本一起使用。然而,API更改将仅在小版本中进行。(6.1、6.2等。)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值