| ... | ... | @@ -393,7 +393,7 @@ pub const Response = struct { |
| 393 | 393 | pub const DoError = Connection.WriteError || error{ UnsupportedTransferEncoding, InvalidContentLength }; |
| 394 | 394 | |
| 395 | 395 | /// Send the response headers. |
| 396 | | pub fn do(res: *Response) !void { |
| 396 | pub fn do(res: *Response) DoError!void { |
| 397 | 397 | switch (res.state) { |
| 398 | 398 | .waited => res.state = .responded, |
| 399 | 399 | .first, .start, .responded, .finished => unreachable, |
| ... | ... | @@ -668,7 +668,7 @@ pub fn deinit(server: *Server) void { |
| 668 | 668 | pub const ListenError = std.os.SocketError || std.os.BindError || std.os.ListenError || std.os.SetSockOptError || std.os.GetSockNameError; |
| 669 | 669 | |
| 670 | 670 | /// Start the HTTP server listening on the given address. |
| 671 | | pub fn listen(server: *Server, address: net.Address) !void { |
| 671 | pub fn listen(server: *Server, address: net.Address) ListenError!void { |
| 672 | 672 | try server.socket.listen(address); |
| 673 | 673 | } |
| 674 | 674 | |