diff --git a/crates/lune-std-net/src/server/mod.rs b/crates/lune-std-net/src/server/mod.rs index 7ac3b24..58ff65b 100644 --- a/crates/lune-std-net/src/server/mod.rs +++ b/crates/lune-std-net/src/server/mod.rs @@ -81,6 +81,7 @@ pub async fn serve(lua: Lua, port: u16, config: ServeConfig) -> LuaResult rt::Write for HyperIo { fn poll_shutdown(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { self.pin_mut().poll_close(cx) } - - fn poll_write_vectored( - self: Pin<&mut Self>, - cx: &mut Context<'_>, - bufs: &[io::IoSlice<'_>], - ) -> Poll> { - self.pin_mut().poll_write_vectored(cx, bufs) - } } // Compat for hyper runtime -> futures-lite @@ -203,12 +195,4 @@ impl AsyncWrite for HyperIo { fn poll_close(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { self.pin_mut().poll_shutdown(cx) } - - fn poll_write_vectored( - self: Pin<&mut Self>, - cx: &mut Context<'_>, - bufs: &[std::io::IoSlice<'_>], - ) -> Poll> { - self.pin_mut().poll_write_vectored(cx, bufs) - } } diff --git a/test.luau b/test.luau new file mode 100644 index 0000000..0a16ec9 --- /dev/null +++ b/test.luau @@ -0,0 +1,7 @@ +local net = require("@lune/net") + +local handle = net.serve(8080, function() + return "Hello, World!" +end) + +print(`Server started on {handle.ip}:{handle.port}`)