gpt4 book ai didi

java - 已建立的连接上的 TLS

转载 作者:太空宇宙 更新时间:2023-11-04 13:08:52 25 4
gpt4 key购买 nike

我正在使用 akka io/streams 编写 Java XMPP 服务器。根据 XMPP 规范,连接模式可以即时切换到 TLS 模式。有没有好的/标准的方法可以使用 akka.io 或 akka.streams 来做到这一点?谢谢!

最佳答案

显然,有 2 个状态阶段是可能的,一个在入站,一个在出站。

Here是 Google 群组上的相应主题。

Basically what I did was have a stateful stage on inbound and outbound[1] that I then mapped to something based on whether it needed to be secure or not. Then I used a broadcast/merge approach to send it to the TLS side and non-TLS side and just had each one ignore the message based on whether encryption was needed or not[0].

希望这有帮助。我自己仍在努力解决与 TCP 套接字的基本 TlsSsl 流连接。

关于java - 已建立的连接上的 TLS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34166957/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com