Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor net::PortForwarder to reduce
handle
fn
This change reduces the code size of `handle` fn inside `PortForwarder` by moving the code inside it to new functions `handle_plaintext`, `handle_encrypt` and `handle_decrypt`. This makes the code more readable and easier to understand. Also, common code between `handle_encrypt` and `handle_decrypt` is moved to two new functions `initiator_handshake` and `responder_handshake`. All the changes are made without changing the functionality of the code and as such should not break anything and should be compatible with the previous commit.
- Loading branch information