1 module libwasm.bindings.NetDashboard;
2 
3 import libwasm.types;
4 
5 import memutils.ct: tuple;
6 @safe:
7 nothrow:
8 
9 struct ConnStatusDict {
10   nothrow:
11   JsHandle handle;
12   alias handle this;
13   this(Handle h) {
14     this.handle = JsHandle(h);
15   }
16   static auto create() {
17     return ConnStatusDict(libwasm_add__object());
18   }
19   void status()(string status) {
20     Object_Call_string__void(this.handle, "status", status);
21   }
22   string status()() {
23     return Object_Getter__string(this.handle, "status");
24   }
25 }
26 struct DNSCacheDict {
27   nothrow:
28   JsHandle handle;
29   alias handle this;
30   this(Handle h) {
31     this.handle = JsHandle(h);
32   }
33   static auto create() {
34     return DNSCacheDict(libwasm_add__object());
35   }
36   void entries()(scope ref Sequence!(DnsCacheEntry) entries) {
37     Object_Call_Handle__void(this.handle, "entries", entries.handle);
38   }
39   auto entries()() {
40     return Sequence!(DnsCacheEntry)(Object_Getter__Handle(this.handle, "entries"));
41   }
42 }
43 struct DNSLookupDict {
44   nothrow:
45   JsHandle handle;
46   alias handle this;
47   this(Handle h) {
48     this.handle = JsHandle(h);
49   }
50   static auto create() {
51     return DNSLookupDict(libwasm_add__object());
52   }
53   void address()(scope ref Sequence!(string) address) {
54     Object_Call_Handle__void(this.handle, "address", address.handle);
55   }
56   auto address()() {
57     return Sequence!(string)(Object_Getter__Handle(this.handle, "address"));
58   }
59   void error()(string error) {
60     Object_Call_string__void(this.handle, "error", error);
61   }
62   string error()() {
63     return Object_Getter__string(this.handle, "error");
64   }
65   void answer()(bool answer) {
66     Object_Call_bool__void(this.handle, "answer", answer);
67   }
68   bool answer()() {
69     return Object_Getter__bool(this.handle, "answer");
70   }
71 }
72 struct DnsCacheEntry {
73   nothrow:
74   JsHandle handle;
75   alias handle this;
76   this(Handle h) {
77     this.handle = JsHandle(h);
78   }
79   static auto create() {
80     return DnsCacheEntry(libwasm_add__object());
81   }
82   void hostname()(string hostname) {
83     Object_Call_string__void(this.handle, "hostname", hostname);
84   }
85   string hostname()() {
86     return Object_Getter__string(this.handle, "hostname");
87   }
88   void hostaddr()(scope ref Sequence!(string) hostaddr) {
89     Object_Call_Handle__void(this.handle, "hostaddr", hostaddr.handle);
90   }
91   auto hostaddr()() {
92     return Sequence!(string)(Object_Getter__Handle(this.handle, "hostaddr"));
93   }
94   void family()(string family) {
95     Object_Call_string__void(this.handle, "family", family);
96   }
97   string family()() {
98     return Object_Getter__string(this.handle, "family");
99   }
100   void expiration()(double expiration) {
101     Object_Call_double__void(this.handle, "expiration", expiration);
102   }
103   double expiration()() {
104     return Object_Getter__double(this.handle, "expiration");
105   }
106   void trr()(bool trr) {
107     Object_Call_bool__void(this.handle, "trr", trr);
108   }
109   bool trr()() {
110     return Object_Getter__bool(this.handle, "trr");
111   }
112 }
113 struct HalfOpenInfoDict {
114   nothrow:
115   JsHandle handle;
116   alias handle this;
117   this(Handle h) {
118     this.handle = JsHandle(h);
119   }
120   static auto create() {
121     return HalfOpenInfoDict(libwasm_add__object());
122   }
123   void speculative()(bool speculative) {
124     Object_Call_bool__void(this.handle, "speculative", speculative);
125   }
126   bool speculative()() {
127     return Object_Getter__bool(this.handle, "speculative");
128   }
129 }
130 struct HttpConnDict {
131   nothrow:
132   JsHandle handle;
133   alias handle this;
134   this(Handle h) {
135     this.handle = JsHandle(h);
136   }
137   static auto create() {
138     return HttpConnDict(libwasm_add__object());
139   }
140   void connections()(scope ref Sequence!(HttpConnectionElement) connections) {
141     Object_Call_Handle__void(this.handle, "connections", connections.handle);
142   }
143   auto connections()() {
144     return Sequence!(HttpConnectionElement)(Object_Getter__Handle(this.handle, "connections"));
145   }
146 }
147 struct HttpConnInfo {
148   nothrow:
149   JsHandle handle;
150   alias handle this;
151   this(Handle h) {
152     this.handle = JsHandle(h);
153   }
154   static auto create() {
155     return HttpConnInfo(libwasm_add__object());
156   }
157   void rtt()(uint rtt) {
158     Object_Call_uint__void(this.handle, "rtt", rtt);
159   }
160   uint rtt()() {
161     return Object_Getter__uint(this.handle, "rtt");
162   }
163   void ttl()(uint ttl) {
164     Object_Call_uint__void(this.handle, "ttl", ttl);
165   }
166   uint ttl()() {
167     return Object_Getter__uint(this.handle, "ttl");
168   }
169   void protocolVersion()(string protocolVersion) {
170     Object_Call_string__void(this.handle, "protocolVersion", protocolVersion);
171   }
172   string protocolVersion()() {
173     return Object_Getter__string(this.handle, "protocolVersion");
174   }
175 }
176 struct HttpConnectionElement {
177   nothrow:
178   JsHandle handle;
179   alias handle this;
180   this(Handle h) {
181     this.handle = JsHandle(h);
182   }
183   static auto create() {
184     return HttpConnectionElement(libwasm_add__object());
185   }
186   void host()(string host) {
187     Object_Call_string__void(this.handle, "host", host);
188   }
189   string host()() {
190     return Object_Getter__string(this.handle, "host");
191   }
192   void port()(uint port) {
193     Object_Call_uint__void(this.handle, "port", port);
194   }
195   uint port()() {
196     return Object_Getter__uint(this.handle, "port");
197   }
198   void spdy()(bool spdy) {
199     Object_Call_bool__void(this.handle, "spdy", spdy);
200   }
201   bool spdy()() {
202     return Object_Getter__bool(this.handle, "spdy");
203   }
204   void ssl()(bool ssl) {
205     Object_Call_bool__void(this.handle, "ssl", ssl);
206   }
207   bool ssl()() {
208     return Object_Getter__bool(this.handle, "ssl");
209   }
210   void active()(scope ref Sequence!(HttpConnInfo) active) {
211     Object_Call_Handle__void(this.handle, "active", active.handle);
212   }
213   auto active()() {
214     return Sequence!(HttpConnInfo)(Object_Getter__Handle(this.handle, "active"));
215   }
216   void idle()(scope ref Sequence!(HttpConnInfo) idle) {
217     Object_Call_Handle__void(this.handle, "idle", idle.handle);
218   }
219   auto idle()() {
220     return Sequence!(HttpConnInfo)(Object_Getter__Handle(this.handle, "idle"));
221   }
222   void halfOpens()(scope ref Sequence!(HalfOpenInfoDict) halfOpens) {
223     Object_Call_Handle__void(this.handle, "halfOpens", halfOpens.handle);
224   }
225   auto halfOpens()() {
226     return Sequence!(HalfOpenInfoDict)(Object_Getter__Handle(this.handle, "halfOpens"));
227   }
228 }
229 struct RcwnPerfStats {
230   nothrow:
231   JsHandle handle;
232   alias handle this;
233   this(Handle h) {
234     this.handle = JsHandle(h);
235   }
236   static auto create() {
237     return RcwnPerfStats(libwasm_add__object());
238   }
239   void avgShort()(uint avgShort) {
240     Object_Call_uint__void(this.handle, "avgShort", avgShort);
241   }
242   uint avgShort()() {
243     return Object_Getter__uint(this.handle, "avgShort");
244   }
245   void avgLong()(uint avgLong) {
246     Object_Call_uint__void(this.handle, "avgLong", avgLong);
247   }
248   uint avgLong()() {
249     return Object_Getter__uint(this.handle, "avgLong");
250   }
251   void stddevLong()(uint stddevLong) {
252     Object_Call_uint__void(this.handle, "stddevLong", stddevLong);
253   }
254   uint stddevLong()() {
255     return Object_Getter__uint(this.handle, "stddevLong");
256   }
257 }
258 struct RcwnStatus {
259   nothrow:
260   JsHandle handle;
261   alias handle this;
262   this(Handle h) {
263     this.handle = JsHandle(h);
264   }
265   static auto create() {
266     return RcwnStatus(libwasm_add__object());
267   }
268   void totalNetworkRequests()(uint totalNetworkRequests) {
269     Object_Call_uint__void(this.handle, "totalNetworkRequests", totalNetworkRequests);
270   }
271   uint totalNetworkRequests()() {
272     return Object_Getter__uint(this.handle, "totalNetworkRequests");
273   }
274   void rcwnCacheWonCount()(uint rcwnCacheWonCount) {
275     Object_Call_uint__void(this.handle, "rcwnCacheWonCount", rcwnCacheWonCount);
276   }
277   uint rcwnCacheWonCount()() {
278     return Object_Getter__uint(this.handle, "rcwnCacheWonCount");
279   }
280   void rcwnNetWonCount()(uint rcwnNetWonCount) {
281     Object_Call_uint__void(this.handle, "rcwnNetWonCount", rcwnNetWonCount);
282   }
283   uint rcwnNetWonCount()() {
284     return Object_Getter__uint(this.handle, "rcwnNetWonCount");
285   }
286   void cacheSlowCount()(uint cacheSlowCount) {
287     Object_Call_uint__void(this.handle, "cacheSlowCount", cacheSlowCount);
288   }
289   uint cacheSlowCount()() {
290     return Object_Getter__uint(this.handle, "cacheSlowCount");
291   }
292   void cacheNotSlowCount()(uint cacheNotSlowCount) {
293     Object_Call_uint__void(this.handle, "cacheNotSlowCount", cacheNotSlowCount);
294   }
295   uint cacheNotSlowCount()() {
296     return Object_Getter__uint(this.handle, "cacheNotSlowCount");
297   }
298   void perfStats()(scope ref Sequence!(RcwnPerfStats) perfStats) {
299     Object_Call_Handle__void(this.handle, "perfStats", perfStats.handle);
300   }
301   auto perfStats()() {
302     return Sequence!(RcwnPerfStats)(Object_Getter__Handle(this.handle, "perfStats"));
303   }
304 }
305 struct SocketElement {
306   nothrow:
307   JsHandle handle;
308   alias handle this;
309   this(Handle h) {
310     this.handle = JsHandle(h);
311   }
312   static auto create() {
313     return SocketElement(libwasm_add__object());
314   }
315   void host()(string host) {
316     Object_Call_string__void(this.handle, "host", host);
317   }
318   string host()() {
319     return Object_Getter__string(this.handle, "host");
320   }
321   void port()(uint port) {
322     Object_Call_uint__void(this.handle, "port", port);
323   }
324   uint port()() {
325     return Object_Getter__uint(this.handle, "port");
326   }
327   void active()(bool active) {
328     Object_Call_bool__void(this.handle, "active", active);
329   }
330   bool active()() {
331     return Object_Getter__bool(this.handle, "active");
332   }
333   void tcp()(bool tcp) {
334     Object_Call_bool__void(this.handle, "tcp", tcp);
335   }
336   bool tcp()() {
337     return Object_Getter__bool(this.handle, "tcp");
338   }
339   void sent()(double sent) {
340     Object_Call_double__void(this.handle, "sent", sent);
341   }
342   double sent()() {
343     return Object_Getter__double(this.handle, "sent");
344   }
345   void received()(double received) {
346     Object_Call_double__void(this.handle, "received", received);
347   }
348   double received()() {
349     return Object_Getter__double(this.handle, "received");
350   }
351 }
352 struct SocketsDict {
353   nothrow:
354   JsHandle handle;
355   alias handle this;
356   this(Handle h) {
357     this.handle = JsHandle(h);
358   }
359   static auto create() {
360     return SocketsDict(libwasm_add__object());
361   }
362   void sockets()(scope ref Sequence!(SocketElement) sockets) {
363     Object_Call_Handle__void(this.handle, "sockets", sockets.handle);
364   }
365   auto sockets()() {
366     return Sequence!(SocketElement)(Object_Getter__Handle(this.handle, "sockets"));
367   }
368   void sent()(double sent) {
369     Object_Call_double__void(this.handle, "sent", sent);
370   }
371   double sent()() {
372     return Object_Getter__double(this.handle, "sent");
373   }
374   void received()(double received) {
375     Object_Call_double__void(this.handle, "received", received);
376   }
377   double received()() {
378     return Object_Getter__double(this.handle, "received");
379   }
380 }
381 struct WebSocketDict {
382   nothrow:
383   JsHandle handle;
384   alias handle this;
385   this(Handle h) {
386     this.handle = JsHandle(h);
387   }
388   static auto create() {
389     return WebSocketDict(libwasm_add__object());
390   }
391   void websockets()(scope ref Sequence!(WebSocketElement) websockets) {
392     Object_Call_Handle__void(this.handle, "websockets", websockets.handle);
393   }
394   auto websockets()() {
395     return Sequence!(WebSocketElement)(Object_Getter__Handle(this.handle, "websockets"));
396   }
397 }
398 struct WebSocketElement {
399   nothrow:
400   JsHandle handle;
401   alias handle this;
402   this(Handle h) {
403     this.handle = JsHandle(h);
404   }
405   static auto create() {
406     return WebSocketElement(libwasm_add__object());
407   }
408   void hostport()(string hostport) {
409     Object_Call_string__void(this.handle, "hostport", hostport);
410   }
411   string hostport()() {
412     return Object_Getter__string(this.handle, "hostport");
413   }
414   void msgsent()(uint msgsent) {
415     Object_Call_uint__void(this.handle, "msgsent", msgsent);
416   }
417   uint msgsent()() {
418     return Object_Getter__uint(this.handle, "msgsent");
419   }
420   void msgreceived()(uint msgreceived) {
421     Object_Call_uint__void(this.handle, "msgreceived", msgreceived);
422   }
423   uint msgreceived()() {
424     return Object_Getter__uint(this.handle, "msgreceived");
425   }
426   void sentsize()(double sentsize) {
427     Object_Call_double__void(this.handle, "sentsize", sentsize);
428   }
429   double sentsize()() {
430     return Object_Getter__double(this.handle, "sentsize");
431   }
432   void receivedsize()(double receivedsize) {
433     Object_Call_double__void(this.handle, "receivedsize", receivedsize);
434   }
435   double receivedsize()() {
436     return Object_Getter__double(this.handle, "receivedsize");
437   }
438   void encrypted()(bool encrypted) {
439     Object_Call_bool__void(this.handle, "encrypted", encrypted);
440   }
441   bool encrypted()() {
442     return Object_Getter__bool(this.handle, "encrypted");
443   }
444 }
445 
446