Struct buttplug::server::ButtplugServerBuilder
source · pub struct ButtplugServerBuilder { /* private fields */ }
Expand description
Configures and creates ButtplugServer instances.
Implementations§
source§impl ButtplugServerBuilder
impl ButtplugServerBuilder
sourcepub fn name(&mut self, name: &str) -> &mut Self
pub fn name(&mut self, name: &str) -> &mut Self
Set the name of the server, which is relayed to the client on connection (mostly for confirmation in UI dialogs)
sourcepub fn max_ping_time(&mut self, ping_time: u32) -> &mut Self
pub fn max_ping_time(&mut self, ping_time: u32) -> &mut Self
Set the maximum ping time, in milliseconds, for the server. If the server does not receive a Ping message in this amount of time after the handshake has succeeded, the server will automatically disconnect. If this is not called, the ping timer will not be activated.
Note that this has nothing to do with communication medium specific pings, like those built into the Websocket protocol. This ping is specific to the Buttplug protocol.
sourcepub fn device_configuration_json(
&mut self,
config_json: Option<String>
) -> &mut Self
pub fn device_configuration_json( &mut self, config_json: Option<String> ) -> &mut Self
Set the device configuration json file contents, to be loaded during build.
sourcepub fn user_device_configuration_json(
&mut self,
config_json: Option<String>
) -> &mut Self
pub fn user_device_configuration_json( &mut self, config_json: Option<String> ) -> &mut Self
Set the user device configuration json file contents, to be loaded during build.
pub fn comm_manager<T>(&mut self, builder: T) -> &mut Selfwhere
T: HardwareCommunicationManagerBuilder + 'static,
pub fn allowed_address(&mut self, address: &str) -> &mut Self
pub fn denied_address(&mut self, address: &str) -> &mut Self
pub fn reserved_index( &mut self, identifier: &ServerDeviceIdentifier, index: u32 ) -> &mut Self
pub fn protocol_factory<T>(&mut self, factory: T) -> &mut Selfwhere
T: ProtocolIdentifierFactory + 'static,
pub fn communication_specifier( &mut self, protocol_name: &str, specifier: ProtocolCommunicationSpecifier ) -> &mut Self
pub fn protocol_attributes( &mut self, identifier: ProtocolAttributesIdentifier, attributes: ProtocolDeviceAttributes ) -> &mut Self
pub fn skip_default_protocols(&mut self) -> &mut Self
pub fn allow_raw_messages(&mut self) -> &mut Self
sourcepub fn finish(&mut self) -> Result<ButtplugServer, ButtplugServerError>
pub fn finish(&mut self) -> Result<ButtplugServer, ButtplugServerError>
Try to build a ButtplugServer using the parameters given.