简体   繁体   English

高速公路websocket

[英]Autobahn websocket

I'm evaluating and building a simple websocket server with autobahn websocket 我正在评估和构建一个带有autobahn websocket的简单websocket服务器

Has anyone used subclass WrappingWebSocketServerProtocol , are there any examples of using this implementation? 有没有人使用子类WrappingWebSocketServerProtocol ,是否有使用此实现的任何示例? What is the benefit over the WebSocketServerProtocol and what submethods to override/implement 与WebSocketServerProtocol相比有什么好处以及要覆盖/实现的子方法

thank you 谢谢

AutobahnPython allows you to run any application protocol that builds on a stream-based transport protocol (like Telnet, IMAP, VNC, ..) over WebSocket. AutobahnPython允许您通过 WebSocket运行基于基于流的传输协议(如Telnet,IMAP,VNC,...)构建的任何应用程序协议。 For this kind of wrapping, you would use the WrappingWebSocketServerProtocol and related classes. 对于这种包装,您将使用WrappingWebSocketServerProtocol和相关类。

AutobahnPython also allows to run WebSocket over any stream-based transport protocol/facility (like Unix domain sockets, pipes, serial, ..). AutobahnPython还允许在任何基于流的传输协议/工具(如Unix域套接字,管道,串行,......)上运行WebSocket。 For this you would use Endpoints : https://github.com/tavendo/AutobahnPython/tree/master/examples/twisted/websocket/echo_endpoints 为此,您将使用端点https//github.com/tavendo/AutobahnPython/tree/master/examples/twisted/websocket/echo_endpoints

Now, both of above are covering special use cases, and if you want to do a "normal" WebSocket app, you would just use the WebSocketServerProtocol and related classes. 现在,上面两个都涵盖了特殊用例,如果你想做一个“普通”的WebSocket应用程序,你只需要使用WebSocketServerProtocol和相关的类。

Found some answers to the following list of examples, if someone is interested: 如果有人感兴趣,请找到以下示例列表的一些答案:

https://github.com/tavendo/AutobahnPython/tree/master/examples/twisted/websocket/wrapping https://github.com/tavendo/AutobahnPython/tree/master/examples/twisted/websocket/wrapping

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM