]> gitweb.ps.run Git - zigws/blobdiff - ws_epoll.zig
update listen port and websocket target port
[zigws] / ws_epoll.zig
index 697309319e27b090b65c20f5eb5133a880d2b5c4..b86237df1aed6b48a4a7f825ca532ea72f4152e3 100644 (file)
@@ -6,7 +6,7 @@ const echo = std.debug.print;
 
 const html =
     \\<script>
-    \\let s = new WebSocket("ws://localhost:8080/");
+    \\let s = new WebSocket("wss://" + window.location.hostname + ":8443");
     \\s.addEventListener("open", (event) => {
     \\  console.log("connected");
     \\  s.send("Hello Server!");
@@ -145,7 +145,7 @@ const Client = struct {
 };
 
 pub fn main() !void {
-    const address = try std.net.Address.parseIp("127.0.0.1", 8080);
+    const address = try std.net.Address.parseIp("127.0.0.1", 8000);
 
     const tpe: u32 = posix.SOCK.STREAM | posix.SOCK.NONBLOCK;
     const protocol = posix.IPPROTO.TCP;