summaryrefslogtreecommitdiff
path: root/server/src/session/mod.rs
blob: b6ea014829bfc6323309adb07b180a21ec220c6c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Copyright 2022-2024 Gabriel Bjørnager Jensen.

use bowshock::net::SessionToken;
use bzipper::FixedString;
use std::net::SocketAddr;

pub struct Session {
	pub token:    SessionToken,
	pub username: FixedString<0x10>,

	pub addr: SocketAddr,
}

impl PartialEq<SessionToken> for Session {
	#[inline(always)]
	fn eq(&self, other: &SessionToken) -> bool { self.token == *other }
}