@@ -36,7 +36,7 @@ mod bindings {
3636 "wasi:filesystem/types.[method]descriptor.append-via-stream" : store | trappable,
3737 "wasi:filesystem/types.[method]descriptor.read-directory" : store | trappable,
3838 "wasi:sockets/types.[method]tcp-socket.bind" : async | trappable,
39- "wasi:sockets/types.[method]tcp-socket.listen" : store | trappable,
39+ "wasi:sockets/types.[method]tcp-socket.listen" : async | store | trappable,
4040 "wasi:sockets/types.[method]tcp-socket.send" : store | trappable,
4141 "wasi:sockets/types.[method]tcp-socket.receive" : store | trappable,
4242 "wasi:sockets/types.[method]udp-socket.bind" : async | trappable,
@@ -823,7 +823,7 @@ impl<T: Send + 'static> wasi::sockets::types::HostTcpSocketWithStore<T> for Spin
823823 )
824824 }
825825
826- fn listen (
826+ async fn listen (
827827 store : Access < ' _ , T , Self > ,
828828 socket : Resource < wasi:: sockets:: types:: TcpSocket > ,
829829 ) -> wasmtime:: Result <
@@ -832,9 +832,7 @@ impl<T: Send + 'static> wasi::sockets::types::HostTcpSocketWithStore<T> for Spin
832832 wasi:: sockets:: types:: ErrorCode ,
833833 > ,
834834 > {
835- convert_result ( latest:: sockets:: types:: HostTcpSocketWithStore :: listen (
836- store, socket,
837- ) )
835+ convert_result ( latest:: sockets:: types:: HostTcpSocketWithStore :: listen ( store, socket) . await )
838836 }
839837
840838 fn send (
0 commit comments