We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8c18aef commit eb5491bCopy full SHA for eb5491b
v2/lib.go
@@ -345,7 +345,13 @@ func (w Window) GetChildProcessID() uint64 {
345
return uint64(C.webui_get_child_process_id(C.size_t(w)))
346
}
347
348
-// SetPort sets a custom web-server network port to be used by WebUI.
+// GetPort returns the network port of the running window.
349
+func (w Window) GetPort() int {
350
+ return int(C.webui_get_port(C.size_t(w)))
351
+}
352
+
353
+// SetPort sets a custom web-server network port to be used by WebUI. Returns
354
+// true if the port is free and usable by WebUI.
355
func (w Window) SetPort(port uint) bool {
356
return bool(C.webui_set_port(C.size_t(w), C.size_t(port)))
357
0 commit comments