1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [wasm_bindgen (extends = EventTarget , extends = :: js_sys :: Object , js_name = TCPServerSocket , typescript_type = "TCPServerSocket")]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `TcpServerSocket` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TCPServerSocket)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `TcpServerSocket`*"]
pub type TcpServerSocket;
# [wasm_bindgen (structural , method , getter , js_class = "TCPServerSocket" , js_name = localPort)]
#[doc = "Getter for the `localPort` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TCPServerSocket/localPort)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `TcpServerSocket`*"]
pub fn local_port(this: &TcpServerSocket) -> u16;
# [wasm_bindgen (structural , method , getter , js_class = "TCPServerSocket" , js_name = onconnect)]
#[doc = "Getter for the `onconnect` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TCPServerSocket/onconnect)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `TcpServerSocket`*"]
pub fn onconnect(this: &TcpServerSocket) -> Option<::js_sys::Function>;
# [wasm_bindgen (structural , method , setter , js_class = "TCPServerSocket" , js_name = onconnect)]
#[doc = "Setter for the `onconnect` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TCPServerSocket/onconnect)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `TcpServerSocket`*"]
pub fn set_onconnect(this: &TcpServerSocket, value: Option<&::js_sys::Function>);
# [wasm_bindgen (structural , method , getter , js_class = "TCPServerSocket" , js_name = onerror)]
#[doc = "Getter for the `onerror` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TCPServerSocket/onerror)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `TcpServerSocket`*"]
pub fn onerror(this: &TcpServerSocket) -> Option<::js_sys::Function>;
# [wasm_bindgen (structural , method , setter , js_class = "TCPServerSocket" , js_name = onerror)]
#[doc = "Setter for the `onerror` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TCPServerSocket/onerror)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `TcpServerSocket`*"]
pub fn set_onerror(this: &TcpServerSocket, value: Option<&::js_sys::Function>);
#[wasm_bindgen(catch, constructor, js_class = "TCPServerSocket")]
#[doc = "The `new TcpServerSocket(..)` constructor, creating a new instance of `TcpServerSocket`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TCPServerSocket/TCPServerSocket)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `TcpServerSocket`*"]
pub fn new(port: u16) -> Result<TcpServerSocket, JsValue>;
#[cfg(feature = "ServerSocketOptions")]
#[wasm_bindgen(catch, constructor, js_class = "TCPServerSocket")]
#[doc = "The `new TcpServerSocket(..)` constructor, creating a new instance of `TcpServerSocket`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TCPServerSocket/TCPServerSocket)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ServerSocketOptions`, `TcpServerSocket`*"]
pub fn new_with_options(
port: u16,
options: &ServerSocketOptions,
) -> Result<TcpServerSocket, JsValue>;
#[cfg(feature = "ServerSocketOptions")]
#[wasm_bindgen(catch, constructor, js_class = "TCPServerSocket")]
#[doc = "The `new TcpServerSocket(..)` constructor, creating a new instance of `TcpServerSocket`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TCPServerSocket/TCPServerSocket)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ServerSocketOptions`, `TcpServerSocket`*"]
pub fn new_with_options_and_backlog(
port: u16,
options: &ServerSocketOptions,
backlog: u16,
) -> Result<TcpServerSocket, JsValue>;
# [wasm_bindgen (method , structural , js_class = "TCPServerSocket" , js_name = close)]
#[doc = "The `close()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TCPServerSocket/close)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `TcpServerSocket`*"]
pub fn close(this: &TcpServerSocket);
}
|