1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-10-02 17:00:47 +00:00
CC-Tweaked/src/main/java/dan200/computercraft
SquidDev 30f4e0829f Add websocket support to HTTP API
This uses Netty's websocket functionality, meaning we do not have to
depend on another library.

As websockets do not fit neatly into the standard polling socket model,
the API is significantly more event based than CCTweaks's. One uses
http.websocket to connect, which will wait until a connection is
established and then returns the connection object (an async variant is
available).

Once you have a websocket object, you can use .send(msg) to transmit a
message. Incoming messages will fire a "websocket_message" event, with
the URL and content as arguments. A convenience method (.receive())
exists to aid waiting for valid messages.
2017-11-15 11:32:17 +00:00
..
api Java 8. Java 8. Does whatever Java 8 can. 2017-07-25 21:10:48 +01:00
client Java 8. Java 8. Does whatever Java 8 can. 2017-07-25 21:10:48 +01:00
core Add websocket support to HTTP API 2017-11-15 11:32:17 +00:00
server/proxy Updated (C) from 2016 to 2017 (#229) 2017-05-13 19:20:39 +01:00
shared Merge pull request #316 from SquidDev-CC/feature/minecraft-1.12.2 2017-09-10 20:52:26 +01:00
ComputerCraft.java Add websocket support to HTTP API 2017-11-15 11:32:17 +00:00