Struct web_sys::TcpServerSocket
source · #[repr(transparent)]pub struct TcpServerSocket { /* private fields */ }
Expand description
The TCPServerSocket
object
This API requires the following crate features to be activated: TcpServerSocket
Implementations§
source§impl TcpServerSocket
impl TcpServerSocket
source§impl TcpServerSocket
impl TcpServerSocket
sourcepub fn new_with_options(
port: u16,
options: &ServerSocketOptions
) -> Result<TcpServerSocket, JsValue>
pub fn new_with_options(
port: u16,
options: &ServerSocketOptions
) -> Result<TcpServerSocket, JsValue>
The new TCPServerSocket(..)
constructor, creating a new instance of TCPServerSocket
This API requires the following crate features to be activated: ServerSocketOptions
, TcpServerSocket
source§impl TcpServerSocket
impl TcpServerSocket
sourcepub fn new_with_options_and_backlog(
port: u16,
options: &ServerSocketOptions,
backlog: u16
) -> Result<TcpServerSocket, JsValue>
pub fn new_with_options_and_backlog(
port: u16,
options: &ServerSocketOptions,
backlog: u16
) -> Result<TcpServerSocket, JsValue>
The new TCPServerSocket(..)
constructor, creating a new instance of TCPServerSocket
This API requires the following crate features to be activated: ServerSocketOptions
, TcpServerSocket
source§impl TcpServerSocket
impl TcpServerSocket
source§impl TcpServerSocket
impl TcpServerSocket
sourcepub fn local_port(&self) -> u16
pub fn local_port(&self) -> u16
The localPort
getter
This API requires the following crate features to be activated: TcpServerSocket
source§impl TcpServerSocket
impl TcpServerSocket
source§impl TcpServerSocket
impl TcpServerSocket
sourcepub fn set_onconnect(&self, onconnect: Option<&Function>)
pub fn set_onconnect(&self, onconnect: Option<&Function>)
The onconnect
setter
This API requires the following crate features to be activated: TcpServerSocket
source§impl TcpServerSocket
impl TcpServerSocket
source§impl TcpServerSocket
impl TcpServerSocket
sourcepub fn set_onerror(&self, onerror: Option<&Function>)
pub fn set_onerror(&self, onerror: Option<&Function>)
The onerror
setter
This API requires the following crate features to be activated: TcpServerSocket
Trait Implementations§
source§impl AsRef<EventTarget> for TcpServerSocket
impl AsRef<EventTarget> for TcpServerSocket
source§fn as_ref(&self) -> &EventTarget
fn as_ref(&self) -> &EventTarget
source§impl AsRef<JsValue> for TcpServerSocket
impl AsRef<JsValue> for TcpServerSocket
source§impl AsRef<Object> for TcpServerSocket
impl AsRef<Object> for TcpServerSocket
source§impl Clone for TcpServerSocket
impl Clone for TcpServerSocket
source§fn clone(&self) -> TcpServerSocket
fn clone(&self) -> TcpServerSocket
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for TcpServerSocket
impl Debug for TcpServerSocket
source§impl From<JsValue> for TcpServerSocket
impl From<JsValue> for TcpServerSocket
source§fn from(obj: JsValue) -> TcpServerSocket
fn from(obj: JsValue) -> TcpServerSocket
source§impl From<TcpServerSocket> for EventTarget
impl From<TcpServerSocket> for EventTarget
source§fn from(obj: TcpServerSocket) -> EventTarget
fn from(obj: TcpServerSocket) -> EventTarget
source§impl From<TcpServerSocket> for JsValue
impl From<TcpServerSocket> for JsValue
source§fn from(obj: TcpServerSocket) -> JsValue
fn from(obj: TcpServerSocket) -> JsValue
source§impl From<TcpServerSocket> for Object
impl From<TcpServerSocket> for Object
source§fn from(obj: TcpServerSocket) -> Object
fn from(obj: TcpServerSocket) -> Object
source§impl FromWasmAbi for TcpServerSocket
impl FromWasmAbi for TcpServerSocket
source§impl<'a> IntoWasmAbi for &'a TcpServerSocket
impl<'a> IntoWasmAbi for &'a TcpServerSocket
source§impl IntoWasmAbi for TcpServerSocket
impl IntoWasmAbi for TcpServerSocket
source§impl JsCast for TcpServerSocket
impl JsCast for TcpServerSocket
source§fn instanceof(val: &JsValue) -> bool
fn instanceof(val: &JsValue) -> bool
instanceof
check to see whether the JsValue
provided is an instance of this type. Read moresource§fn unchecked_from_js(val: JsValue) -> Self
fn unchecked_from_js(val: JsValue) -> Self
source§fn unchecked_from_js_ref(val: &JsValue) -> &Self
fn unchecked_from_js_ref(val: &JsValue) -> &Self
source§fn is_instance_of<T>(&self) -> boolwhere
T: JsCast,
fn is_instance_of<T>(&self) -> boolwhere
T: JsCast,
T
. Read moresource§fn dyn_into<T>(self) -> Result<T, Self>where
T: JsCast,
fn dyn_into<T>(self) -> Result<T, Self>where
T: JsCast,
T
. Read moresource§fn dyn_ref<T>(&self) -> Option<&T>where
T: JsCast,
fn dyn_ref<T>(&self) -> Option<&T>where
T: JsCast,
T
. Read moresource§fn unchecked_into<T>(self) -> Twhere
T: JsCast,
fn unchecked_into<T>(self) -> Twhere
T: JsCast,
source§impl OptionFromWasmAbi for TcpServerSocket
impl OptionFromWasmAbi for TcpServerSocket
source§impl<'a> OptionIntoWasmAbi for &'a TcpServerSocket
impl<'a> OptionIntoWasmAbi for &'a TcpServerSocket
source§impl OptionIntoWasmAbi for TcpServerSocket
impl OptionIntoWasmAbi for TcpServerSocket
source§impl RefFromWasmAbi for TcpServerSocket
impl RefFromWasmAbi for TcpServerSocket
§type Abi = <JsValue as RefFromWasmAbi>::Abi
type Abi = <JsValue as RefFromWasmAbi>::Abi
Self
are recovered from.§type Anchor = ManuallyDrop<TcpServerSocket>
type Anchor = ManuallyDrop<TcpServerSocket>
Self
for the duration of the
invocation of the function that has an &Self
parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous. Read moreAuto Trait Implementations§
impl RefUnwindSafe for TcpServerSocket
impl !Send for TcpServerSocket
impl !Sync for TcpServerSocket
impl Unpin for TcpServerSocket
impl UnwindSafe for TcpServerSocket
Blanket Implementations§
source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
IntoWasmAbi::Abi
source§fn return_abi(self, extra: &mut dyn Stack) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self, extra: &mut dyn Stack) -> <T as ReturnWasmAbi>::Abi
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
. Read more