Alexander Palagin ac230a6278
Handshake response object if handshake failed (#29)
* added handshake response object, so if error occurs on websocket handhsake stage, server's response can be reachable for further decisions

* fixed typo; removed c++11 style constructors
2021-02-04 08:30:40 +01:00
2020-12-24 12:48:53 +01:00
2020-10-13 09:14:21 +02:00
2020-08-19 11:04:35 +02:00
2020-09-02 16:54:37 +02:00
2020-08-19 11:04:35 +02:00

Defold websocket extension

Build Status

Installation

To use this library in your Defold project, add the following URL to your game.project dependencies:

https://github.com/defold/extension-websocket/archive/master.zip

We recommend using a link to a zip file of a specific release.

API reference

https://defold.com/extension-websocket/api/

Debugging

In order to make it easier to debug this extension, we provide a game.project setting websocket.debug.

Set it to:

  • 0 to disable debugging (i.e. no debug output).
  • 1 to display state changes.
  • 2 to display the messages sent and received.

External resources

To verify that your websocket server works, you can test it with some tools.

Or, you can test your server on this web page:

To monitor all the packets sent to/from the client/server, you can use e.g.

For command line debugging, there's

  • tcpdump: sudo tcpdump -X -s0 -ilo0 port 8080 (example for local ws:// connection)

  • tcpdump: sudo tcpdump -X -s0 host echo.websocket.org (Monitors packets to/from echo.websocket.org)

Credits

This extension makes use of the C library WSlay by @tatsuhiro-t:

Description
No description provided
Readme 17 MiB
Languages
C 63.9%
C++ 36.1%