Results 76 comments of IronsDu

@akoolenbourke asio already support co_await, but has't the core fundamental abstractions (task, async_generator, when_all(), etc.) . so if i want some async function to sync, it must need i am...

asio already support co_awiat, can both use cppcoro and asio? i think will rewrite it use cppcoro and async asio. maybe persuade asio use cppcoro to support co_await ?

Hi, i see asio can't help me translate async to sync(for co_await). so i very hope cppcoro will slit io, and focus generic, core components.

1. UDP跟TCP差别非常大的两个协议,强行放到一个网络库所谓i的支持,其实并没有什么意义。 2. 不妨在更高的层面上把TCP和可靠UDP结合起来,实现更高的链接抽象。 (所以,这不是brynet的职责)

> 我们现在碰到一个问题,给100个设备同时发送数据,在接收端会看到粘包的情况 1. 没太明白你说的这个场景,可以再详细说说:譬如谁给谁发,谁在接受谁。 2. 粘包是不可避免的,TCP是面向流的,接收端必须按照协议去parse(剥离)消息。

> 我这边维护了100个客户端,每5s同时分别给100个服务端发送心跳数据,长度是24,用wireshark抓包看到客户端有时候发出了48长度的数据 嗯,这极有可能是内核把我们两次send的数据合并到一个TCP报文段里了。

你需要自己能从48字节的数据里区分出这是两个独立的业务消息。

> > > 我这边维护了100个客户端,每5s同时分别给100个服务端发送心跳数据,长度是24,用wireshark抓包看到客户端有时候发出了48长度的数据 > > > > > > 嗯,这极有可能是内核把我们两次send的数据合并到一个TCP报文段里了。 > > 但是我们两次发送数据的时间间隔是5s钟,且设置了nodelay,还是粘到一起了 > 我会每隔5s用100个客户端给100个服务器发心跳数据,客户端和服务端是1对1 这个确实不好说。nodelay应该说只是一种建议。但它并不能保证一定分开为两个独立的TCP报文。 我们不要去依赖它和做任何假设。

@Charist 哦,不好意思,需要用户自己调用。 譬如这样: ``` #ifdef USE_OPENSSL SSL_library_init(); OpenSSL_add_all_algorithms(); SSL_load_error_strings(); #endif ``` https://github.com/IronsDu/Joynet/blob/b95eeb485bd5d726fba0e47e22a1bce27a4e3ab1/src/Joynet.cpp#L518-L522

另外还需要在构建链接是调用 `WithServerSideSSL` 或者 `WithClientSideSSL`