Server -> client connection
(
socket: TcpStream,
key: Option<Arc<SecretKey>>,
)
| 61 | |
| 62 | /// Server -> client connection |
| 63 | pub async fn accept_client( |
| 64 | socket: TcpStream, |
| 65 | key: Option<Arc<SecretKey>>, |
| 66 | ) -> crate::Result<ServerConnection> { |
| 67 | Connection::init(socket, COMM_PROTOCOL, "hq-server", "hq-client", key) |
| 68 | .await |
| 69 | .map_err(|e| e.into()) |
| 70 | } |