mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-09 13:01:28 +03:00
finish tcp rendezvous keep alive logic following mqtt, but defined by
server so that it can be easily to be controlled at server side.
This commit is contained in:
@@ -73,6 +73,7 @@ message RegisterPkResponse {
|
||||
SERVER_ERROR = 7;
|
||||
}
|
||||
Result result = 1;
|
||||
int32 keep_alive = 2;
|
||||
}
|
||||
|
||||
message PunchHoleResponse {
|
||||
|
||||
@@ -330,6 +330,9 @@ impl Encrypt {
|
||||
}
|
||||
|
||||
pub fn dec(&mut self, bytes: &mut BytesMut) -> Result<(), Error> {
|
||||
if bytes.is_empty() {
|
||||
return Ok(());
|
||||
}
|
||||
self.2 += 1;
|
||||
let nonce = FramedStream::get_nonce(self.2);
|
||||
match secretbox::open(bytes, &nonce, &self.0) {
|
||||
|
||||
Reference in New Issue
Block a user