node_sys/interface/
net_server_options.rs1use wasm_bindgen::prelude::*;
2
3#[wasm_bindgen]
4#[derive(Clone, Copy, Debug, Eq, PartialEq)]
5pub struct NetServerOptions {
6 allow_half_open: Option<bool>,
7 pause_on_connect: Option<bool>,
8}
9
10#[wasm_bindgen]
11impl NetServerOptions {
12 #[wasm_bindgen(getter)]
13 pub fn allow_half_open(self) -> Option<bool> {
14 self.allow_half_open
15 }
16
17 #[wasm_bindgen(setter)]
18 pub fn set_allow_half_open(mut self, value: Option<bool>) {
19 self.allow_half_open = value;
20 }
21
22 #[wasm_bindgen(getter)]
23 pub fn pause_on_connect(self) -> Option<bool> {
24 self.pause_on_connect
25 }
26
27 #[wasm_bindgen(setter)]
28 pub fn set_pause_on_connect(mut self, value: Option<bool>) {
29 self.pause_on_connect = value;
30 }
31}