Skip to content

Commit

Permalink
set socket tos-dscp EF flag
Browse files Browse the repository at this point in the history
  • Loading branch information
korejan committed Jan 13, 2024
1 parent 73d44b5 commit 18aabd8
Show file tree
Hide file tree
Showing 26 changed files with 281 additions and 259 deletions.
479 changes: 245 additions & 234 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion alvr/audio/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "alvr_audio"
version = "18.7.0"
version = "18.8.0"
authors = ["alvr-org", "Riccardo Zaglia <riccardo.zaglia5@gmail.com>"]
license = "MIT"
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion alvr/client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "alvr_client"
version = "18.7.0"
version = "18.8.0"
authors = ["alvr-org", "Riccardo Zaglia <riccardo.zaglia5@gmail.com>"]
license = "MIT"
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion alvr/commands/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "alvr_commands"
version = "18.7.0"
version = "18.8.0"
authors = ["alvr-org", "Riccardo Zaglia <riccardo.zaglia5@gmail.com>"]
license = "MIT"
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion alvr/common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "alvr_common"
version = "18.7.0"
version = "18.8.0"
authors = ["alvr-org", "Riccardo Zaglia <riccardo.zaglia5@gmail.com>"]
license = "MIT"
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion alvr/filesystem/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "alvr_filesystem"
version = "18.7.0"
version = "18.8.0"
authors = ["alvr-org", "Patrick Nicolas <patricknicolas@laposte.net>"]
license = "MIT"
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion alvr/launcher/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "alvr_launcher"
version = "18.7.0"
version = "18.8.0"
authors = ["alvr-org", "Riccardo Zaglia <riccardo.zaglia5@gmail.com>"]
license = "MIT"
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion alvr/openxr-client/alxr-android-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "alxr-android-client"
version = "0.21.0"
version = "0.22.0"
authors = ["korejan <64199710+korejan@users.noreply.github.com>"]
edition = "2021"
description = "An OpenXR based ALVR client for android platorms"
Expand Down
2 changes: 1 addition & 1 deletion alvr/openxr-client/alxr-android-client/lynx/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "alxr-client-lynx"
version = "0.21.0"
version = "0.22.0"
authors = ["korejan <64199710+korejan@users.noreply.github.com>"]
edition = "2021"
description = "An OpenXR based ALVR client for android platorms"
Expand Down
2 changes: 1 addition & 1 deletion alvr/openxr-client/alxr-android-client/pico-v4/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "alxr-client-pico-v4"
version = "0.21.0"
version = "0.22.0"
authors = ["korejan <64199710+korejan@users.noreply.github.com>"]
edition = "2021"
description = "An OpenXR based ALVR client for Pico 4/Neo 3, pre PUI v5.2.x"
Expand Down
2 changes: 1 addition & 1 deletion alvr/openxr-client/alxr-android-client/pico/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "alxr-client-pico"
version = "0.21.0"
version = "0.22.0"
authors = ["korejan <64199710+korejan@users.noreply.github.com>"]
edition = "2021"
description = "An OpenXR based ALVR client for Pico 4/Neo 3, PUI >= v5.2.x"
Expand Down
2 changes: 1 addition & 1 deletion alvr/openxr-client/alxr-android-client/quest/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "alxr-client-quest"
version = "0.21.0"
version = "0.22.0"
authors = ["korejan <64199710+korejan@users.noreply.github.com>"]
edition = "2021"
description = "An OpenXR based ALVR client for Oculus Quest 1/2"
Expand Down
2 changes: 1 addition & 1 deletion alvr/openxr-client/alxr-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "alxr-client"
version = "0.21.0"
version = "0.22.0"
authors = ["korejan <64199710+korejan@users.noreply.github.com>"]
edition = "2021"
description = "An OpenXR based ALVR client for non-android platorms"
Expand Down
2 changes: 1 addition & 1 deletion alvr/openxr-client/alxr-client/uwp/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "alxr-client-uwp"
version = "1.21.0"
version = "1.22.0"
authors = ["korejan <64199710+korejan@users.noreply.github.com>"]
edition = "2021"
build = ".build/main.rs"
Expand Down
2 changes: 1 addition & 1 deletion alvr/openxr-client/alxr-common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "alxr-common"
version = "0.21.0"
version = "0.22.0"
authors = ["korejan <64199710+korejan@users.noreply.github.com>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion alvr/openxr-client/alxr-engine-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "alxr-engine-sys"
version = "0.21.0"
version = "0.22.0"
authors = ["korejan <64199710+korejan@users.noreply.github.com>"]
edition = "2021"
links = "alxr_engine"
Expand Down
2 changes: 1 addition & 1 deletion alvr/server/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "alvr_server"
version = "18.7.0"
version = "18.8.0"
authors = ["alvr-org", "polygraphene", "Valve Corporation"]
license = "MIT"
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion alvr/session/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "alvr_session"
version = "18.7.0"
version = "18.8.0"
authors = ["alvr-org", "Riccardo Zaglia <riccardo.zaglia5@gmail.com>"]
license = "MIT"
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion alvr/sockets/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "alvr_sockets"
version = "18.7.0"
version = "18.8.0"
authors = ["alvr-org", "Riccardo Zaglia <riccardo.zaglia5@gmail.com>"]
license = "MIT"
edition = "2021"
Expand Down
9 changes: 8 additions & 1 deletion alvr/sockets/src/stream_socket/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ use tokio_util::codec::Framed;
pub type TcpStreamSendSocket = Arc<Mutex<SplitSink<Framed<TcpStream, Ldc>, Bytes>>>;
pub type TcpStreamReceiveSocket = SplitStream<Framed<TcpStream, Ldc>>;

const IPTOS_DSCP_EF: u32 = 0xb8;

pub async fn bind(
port: u16,
send_buffer_bytes: SocketBufferSize,
Expand All @@ -27,6 +29,9 @@ pub async fn bind(

super::set_socket_buffers(&socket, send_buffer_bytes, recv_buffer_bytes).ok();

socket.set_nodelay(true).ok();
socket.set_tos(IPTOS_DSCP_EF).ok();

TcpListener::from_std(socket.into()).map_err(err!())
}

Expand Down Expand Up @@ -60,8 +65,10 @@ pub async fn connect_to_client(

super::set_socket_buffers(&socket, send_buffer_bytes, recv_buffer_bytes).ok();

socket.set_nodelay(true).ok();
socket.set_tos(IPTOS_DSCP_EF).ok();

let socket = TcpStream::from_std(socket.into()).map_err(err!())?;
socket.set_nodelay(true).map_err(err!())?;
let socket = Framed::new(socket, Ldc::new());
let (send_socket, receive_socket) = socket.split();

Expand Down
4 changes: 4 additions & 0 deletions alvr/sockets/src/stream_socket/udp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ use tokio::{
};
use tokio_util::udp::UdpFramed;

const IPTOS_DSCP_EF: u32 = 0xb8;

#[allow(clippy::type_complexity)]
#[derive(Clone)]
pub struct UdpStreamSendSocket {
Expand All @@ -44,6 +46,8 @@ pub async fn bind(

super::set_socket_buffers(&socket, send_buffer_bytes, recv_buffer_bytes).ok();

socket.set_tos(IPTOS_DSCP_EF).ok();

UdpSocket::from_std(socket.into()).map_err(err!())
}

Expand Down
2 changes: 1 addition & 1 deletion alvr/vrcompositor-wrapper/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "vrcompositor-wrapper"
version = "18.7.0"
version = "18.8.0"
authors = ["alvr-org", "Patrick Nicolas <patricknicolas@laposte.net>"]
license = "MIT"
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion alvr/vulkan-layer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "alvr_vulkan-layer"
version = "18.7.0"
version = "18.8.0"
authors = ["alvr-org", "ARM", "Patrick Nicolas <patricknicolas@laposte.net>"]
license = "MIT"
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion alvr/xtask/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "alvr_xtask"
version = "18.7.0"
version = "18.8.0"
authors = ["alvr-org", "Riccardo Zaglia <riccardo.zaglia5@gmail.com>"]
license = "MIT"
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion packaging/deb/control
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Vcs-Browser: /~https://github.com/alvr-org/ALVR
Vcs-Git: /~https://github.com/alvr-org/ALVR.git
Rules-Requires-Root: no
Package: alvr
Version: 18.7.0
Version: 18.8.0
Architecture: amd64
Recommends: steam
Description: Stream VR games from your PC to your headset via Wi-Fi
Expand Down
4 changes: 2 additions & 2 deletions packaging/rpm/alvr.spec
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Name: alvr
Version: 18.7.0
Version: 18.8.0
Release: 1.0.0
Summary: Stream VR games from your PC to your headset via Wi-Fi
License: MIT
Source: /~https://github.com/alvr-org/ALVR/archive/refs/tags/v18.7.0.tar.gz
Source: /~https://github.com/alvr-org/ALVR/archive/refs/tags/v18.8.0.tar.gz
URL: /~https://github.com/alvr-org/ALVR/
ExclusiveArch: x86_64
BuildRequires: alsa-lib-devel cairo-gobject-devel cargo clang-devel ffmpeg-devel gcc gcc-c++ cmake ImageMagick (jack-audio-connection-kit-devel or pipewire-jack-audio-connection-kit-devel) libunwind-devel openssl-devel rpmdevtools rust rust-atk-sys-devel rust-cairo-sys-rs-devel rust-gdk-sys-devel rust-glib-sys-devel rust-pango-sys-devel selinux-policy-devel vulkan-headers vulkan-loader-devel
Expand Down

0 comments on commit 18aabd8

Please sign in to comment.