You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 87e7c8a
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,16 +73,16 @@ Once discovery has been completed communication can take place over a socket of
73
73
The `defnet/tcp_server` module can be used to create a TCP socket server that accepts incoming TCP client connections and can send and receive data. Example:
74
74
75
75
```
76
-
local function on_data(data, ip)
76
+
local function on_data(data, ip, port, client)
77
77
print("Received", data, "from", ip)
78
78
return "My response"
79
79
end
80
80
81
-
local function on_client_connected(ip)
81
+
local function on_client_connected(ip, port, client)
82
82
print("Client", ip, "connected")
83
83
end
84
84
85
-
local function on_client_disconnected(ip)
85
+
local function on_client_disconnected(ip, port, client)
0 commit comments