Skip to content

Commit

Permalink
magicsock: some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dignifiedquire committed Mar 20, 2023
1 parent fee2b4e commit c0118d0
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 157 deletions.
2 changes: 0 additions & 2 deletions src/hp/derp/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ use std::time::Duration;
use anyhow::Result;
use serde::{Deserialize, Serialize};
use tokio::io::{AsyncRead, AsyncWrite};
use tokio::sync::oneshot::Receiver;

use crate::hp::key::node::{PublicKey, SecretKey};

use super::client::ClientInfo;
use super::conn::Conn;

// TODO: skiping `verboseDropKeys` for now

Expand Down
13 changes: 0 additions & 13 deletions src/hp/magicsock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,6 @@ use self::endpoint::Endpoint;
/// is the max supported by a default configuration of macOS. Some platforms will silently clamp the value.
const SOCKET_BUFFER_SIZE: usize = 7 << 20;

/// Reports whether magicsock should enable the DERP return path optimization (Issue 150).
fn use_derp_route() -> bool {
// if b, ok := debugUseDerpRoute().Get(); ok {
// return b;
// }

// ob := controlclient.DERPRouteFlag();
// if v, ok := ob.Get(); ok {
// return v
// }
true
}

/// All the information magicsock tracks about a particular peer.
#[derive(Clone, Debug)]
pub struct PeerInfo {
Expand Down
Loading

0 comments on commit c0118d0

Please sign in to comment.