Skip to content

Commit be88383

Browse files
committed
feat: add support for async websocket client
1 parent ca58f01 commit be88383

File tree

13 files changed

+1015
-171
lines changed

13 files changed

+1015
-171
lines changed

examples/autobahn/autobahn.zig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ const std = @import("std");
22
const clients = @import("zabi").clients;
33

44
const Allocator = std.mem.Allocator;
5-
const WebSocketClient = clients.WebSocketClient;
5+
const WebSocketClient = clients.blocking.WebSocketClient;
6+
const AsyncWebSocketClient = clients.non_blocking.AsyncWebSocketClient;
67

78
pub fn main() !void {
89
var gpa = std.heap.GeneralPurposeAllocator(.{}){};

src/clients/IPC.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const FeeHistory = transaction.FeeHistory;
4747
const Gwei = types.Gwei;
4848
const Hash = types.Hash;
4949
const Hex = types.Hex;
50-
const IpcReader = @import("ipc_reader.zig").IpcReader;
50+
const IpcReader = @import("blocking/IpcReader.zig");
5151
const JsonParsed = std.json.Parsed;
5252
const Log = log.Log;
5353
const LogRequest = log.LogRequest;

src/clients/WebSocket.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const Uri = std.Uri;
7979
const Value = std.json.Value;
8080
const WatchLogsRequest = log.WatchLogsRequest;
8181
const Wei = types.Wei;
82-
const WsClient = @import("WebSocketClient.zig");
82+
const WsClient = @import("blocking/WebSocketClient.zig");
8383

8484
const WebSocketHandler = @This();
8585

0 commit comments

Comments
 (0)