We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3328f28 commit 452b394Copy full SHA for 452b394
src/bee/socket/lua_socket.rs
@@ -87,7 +87,7 @@ impl LuaSocket {
87
}
88
89
90
- async fn bind(&mut self, addr: String, port: i32) -> LuaResult<()> {
+ async fn bind(&mut self, addr: String, port: i32) -> LuaResult<bool> {
91
match self.socket_type {
92
SocketType::Tcp => {
93
let addr = format!("{}:{}", addr, port);
@@ -97,7 +97,7 @@ impl LuaSocket {
97
.lock()
98
.unwrap()
99
.insert_socket_stream(self.fd, stream);
100
- Ok(())
+ Ok(true)
101
102
#[cfg(unix)]
103
SocketType::Unix => {
@@ -107,7 +107,7 @@ impl LuaSocket {
107
108
109
110
111
112
_ => Err(mlua::Error::RuntimeError("Invalid fd".to_string())),
113
0 commit comments