#[repr(C)]pub struct _tagEOS_P2P_SocketId {
pub ApiVersion: i32,
pub SocketName: [c_char; 33],
}Expand description
P2P Socket ID
The Socket ID contains an application-defined name for the connection between a local person and another peer.
When a remote user receives a connection request from you, they will receive this information. It can be important to only accept connections with a known socket-name and/or from a known user, to prevent leaking of private information, such as a user’s IP address. Using the socket name as a secret key can help prevent such leaks. Shared private data, like a private match’s Session ID are good candidates for a socket name.
Fields§
§ApiVersion: i32API Version: Set this to EOS_P2P_SOCKETID_API_LATEST.
SocketName: [c_char; 33]A name for the connection. Must be a NULL-terminated string of between 1-32 alpha-numeric characters (A-Z, a-z, 0-9, ‘-’, ‘_’, ’ ’, ‘+’, ‘=’, ‘.’)
Trait Implementations§
Source§impl Clone for _tagEOS_P2P_SocketId
impl Clone for _tagEOS_P2P_SocketId
Source§fn clone(&self) -> _tagEOS_P2P_SocketId
fn clone(&self) -> _tagEOS_P2P_SocketId
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for _tagEOS_P2P_SocketId
impl Debug for _tagEOS_P2P_SocketId
Source§impl Default for _tagEOS_P2P_SocketId
impl Default for _tagEOS_P2P_SocketId
impl Copy for _tagEOS_P2P_SocketId
Auto Trait Implementations§
impl Freeze for _tagEOS_P2P_SocketId
impl RefUnwindSafe for _tagEOS_P2P_SocketId
impl Send for _tagEOS_P2P_SocketId
impl Sync for _tagEOS_P2P_SocketId
impl Unpin for _tagEOS_P2P_SocketId
impl UnsafeUnpin for _tagEOS_P2P_SocketId
impl UnwindSafe for _tagEOS_P2P_SocketId
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more