pub struct Client { /* private fields */ }Expand description
Contains the socket to connect to VRChat OSC to send messages.
Can either be created with a ClientBuilder or Client::new
Implementations§
Source§impl Client
impl Client
Sourcepub fn new(server_address: SocketAddr, client_socket: UdpSocket) -> Self
pub fn new(server_address: SocketAddr, client_socket: UdpSocket) -> Self
Create a Client without ClientBuilder. client_socket.
Source§impl Client
impl Client
Sourcepub fn change_server_address(&mut self, new_address: SocketAddr) -> Result<()>
pub fn change_server_address(&mut self, new_address: SocketAddr) -> Result<()>
Change the address (ip and port) that the client sends OSC messages to.
Err if the socket could not connect to the new address
Sourcepub fn change_server_ip(&mut self, new_ip: IpAddr) -> Result<()>
pub fn change_server_ip(&mut self, new_ip: IpAddr) -> Result<()>
Change the ip that the client sends OSC messages to.
Err if the socket could not connect to the new address.
Sourcepub fn change_server_port(&mut self, new_port: u16) -> Result<()>
pub fn change_server_port(&mut self, new_port: u16) -> Result<()>
Change the port that the client sends OSC messages to.
Err if the socket could not connect to the new address.
Sourcepub fn typing_indicator(&self, toggle: bool) -> Result<()>
pub fn typing_indicator(&self, toggle: bool) -> Result<()>
Set the visibility of the typing indicator.
Err if the client is not connected to anything
Panics if it could not encode an OscMessage (Should not happen, and if it does, not much a downstream user can do about it anyway)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnwindSafe for Client
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