add socket:get_address, serversocket:get_port
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -59,6 +59,9 @@ socket:is_alive() --> bool
|
||||
|
||||
-- Проверяет наличие соединения (доступно использование socket:send(...)).
|
||||
socket:is_connected() --> bool
|
||||
|
||||
-- Возвращает адрес и порт соединения.
|
||||
socket:get_address() --> str, int
|
||||
```
|
||||
|
||||
```lua
|
||||
@@ -80,6 +83,9 @@ server:close()
|
||||
|
||||
-- Проверяет, существует и открыт ли TCP сервер.
|
||||
server:is_open() --> bool
|
||||
|
||||
-- Возвращает порт сервера.
|
||||
server:get_port() --> int
|
||||
```
|
||||
|
||||
## Аналитика
|
||||
|
||||
Reference in New Issue
Block a user