add socket:get_address, serversocket:get_port

This commit is contained in:
MihailRis
2024-11-30 22:32:14 +03:00
parent 3e949bd499
commit 21c76c1b0d
6 changed files with 66 additions and 12 deletions
+6
View File
@@ -59,6 +59,9 @@ socket:is_alive() --> bool
-- Checks if the connection is present (using socket:send(...) is available).
socket:is_connected() --> bool
-- Returns the address and port of the connection.
socket:get_address() --> str, int
```
```lua
@@ -80,6 +83,9 @@ server:close()
-- Checks if the TCP server exists and is open.
server:is_open() --> bool
-- Returns the server port.
server:get_port() --> int
```
## Analytics