defnet

Defold networking examples

MIT License

Stars
65

Bot releases are hidden (Show)

defnet - DefNet 6.3.0 Latest Release

Published by britzl about 2 years ago

CHANGE: The new http route handler has been generalised to return the matching function and the pattern matches

defnet - DefNet 6.2.0

Published by britzl about 2 years ago

NEW: Added defnet/http_router.lua to create a http server router instance
NEW: Added http_server.set_router() to set a router for the http server

defnet - DefNet 6.1.0

Published by britzl over 2 years ago

FIX: Fixed an issue related to closing of sockets.
CHANGE: Removed dependency on britzl/defold-luasocket

Thanks @sashkent3 !

defnet - DefNet 6.0.0

Published by britzl over 3 years ago

BREAKING CHANGE: The p2p_discovery module will no longer stop the discovery service when it finds a host. It is up to the listener to decide if discovery should end or continue in search of additional hosts.
NEW: The p2p_discovery module will now send any additional discovery data that is encountered after the discovery message to the listener. This allows a client to pass extra data such as a user id or other token or information to the host.

Thanks to @lharder for the contributions!

defnet - DefNet 5.1.1

Published by britzl over 3 years ago

FIX: The tcp_server.lua used the wrong method to get the client IP. Thanks @JAlHund !

defnet - DefNet 5.1.0

Published by britzl almost 4 years ago

FIX: The TCP client now handle partial data and aggregates it over multiple read attempts. Thanks to @JAlHund for the contribution.

defnet - DefNet 5.0.2

Published by britzl about 4 years ago

FIX: TCP Server improvement

defnet - DefNet 5.0.1

Published by britzl over 6 years ago

FIX: Removed debug print in http_server

defnet - DefNet 5.0.0

Published by britzl over 6 years ago

NEW: http_server now handles POST requests
NEW: tcp_server.send(data, client) to send to a single client
BREAKING CHANGE: tcp_server.send(data) renamed to tcp_server.broadcast(data)

defnet - DefNet 4.0.0

Published by britzl over 6 years ago

BREAKING CHANGE: The async websocket functionality has been moved to a separate repository (https://github.com/britzl/defold-websocket)

defnet - DefNet 3.3

Published by britzl almost 7 years ago

NEW: Added dependency to defold-luasocket project and removed manually copied files from LuaSocket.

defnet - DefNet 3.2.3

Published by britzl about 7 years ago

FIX: The tcp_server did sometimes fail to assert even though the socket was created. Changed the way the assert is done.

defnet - DefNet 3.2.2

Published by britzl about 7 years ago

FIX: Only keep reading from client socket while connected

defnet - DefNet 3.2.1

Published by britzl about 7 years ago

CHANGE: The tcp_send_queue will send all data in the queue each update() instead of only the first data in the queue
CHANGE: The tcp_client will read lines until timeout instead of only a single line

defnet - DefNet 3.2

Published by britzl about 7 years ago

tcp_send_queue.lua now returns any error message while send
tcp_send_queue.lua handles partial sends better
tcp_client.lua now has a on_disconnect callback

defnet - DefNet 3.1

Published by britzl over 7 years ago

Removed coxpcall as the current use of pcall and coroutines doesn't seem to be a problem.

defnet - DefNet 3.0

Published by britzl over 7 years ago

NEW: Added support for chunked transfer encoding in the HTTP Server.

CHANGE: The routing functions in the HTTP server will now receive any matches as an indexed array instead of unpacked to individual arguments.
CHANGE: The routing functions in the HTTP server can will now receive a stream callback function as it's second argument. This function can be used instead of returning a string.
CHANGE: The routing functions in the HTTP server can now return a function instead of a string. If a function is returned it will be called repeatedly over time to get more data to send as a response. This is typically used for chunked transfers.

defnet - DefNet 2.1.1

Published by britzl over 7 years ago

Reduced default TCP chunk size

defnet - DefNet 2.1

Published by britzl over 7 years ago

Large TCP payloads will now be sent in multiple TCP send calls. The maximum TCP send chunk size is configurable per TCP send queue.

defnet - DefNet 2.0

Published by britzl over 7 years ago

NEW: http_server now has support for Access-Control-Allow-Origin response header. The default value is Access-Control-Allow-Origin: *. The value is controlled via the public variable access_control on the http server instance. Set it to nil to disable the response header.

BREAKING CHANGE: http_server.html(), http_server.json() and http_server.file() response creator functions have been moved to the http server instance to allow creation of a response with all headers set properly