Skip to content

ivasilyeu/defold-extension-websocket

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

109 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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/

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

Debugging

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

  • disabled to disable debugging (i.e. no debug output).
  • state to display state changes.
  • verbose to display the messages, state changes and more.

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:

The test server used by the example:

About

A native websocket implementation for Defold

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C 63.1%
  • C++ 36.9%