Rebol Tutorial
Rebol Tutorial

Reputation: 2754

Any simple standalone code sample for a websocket protocol (ws) implementation in rebol?

I read cheyenne server is going to implement it ( http://web.syllable.org/news/2010-01-02-22-16-WebSockets-for-Cheyenne-web-server.html ) , but for learning purpose I'd like more to see the shortest sample code of a websocket server and a websocket client in rebol / rebol or rebol / rebol view or rebol / javascript.

like this example in java http://blog.jwebsocket.org/2010/06/17/jwebsocket-instead-of-xhr-and-comet/

or this example in php http://blog.digitalbackcountry.com/2010/07/websocket-charting-demo-with-html5-and-javascript/

Could also Rebol include such protocol natively in some future like for the rest (http, ftp,...) ?

Upvotes: -1

Views: 7947

Answers (3)

Oldes
Oldes

Reputation: 989

Just for a record, my HTTPd web server module for Rebol3 has built-in WebSocket support: https://github.com/Oldes/Rebol-HTTPd

Upvotes: 0

endo64
endo64

Reputation: 2307

I write this by looking at this java example: http://github.com/adamac/Java-WebSocket-client/blob/master/src/com/sixfire/websocket/WebSocket.java

and tested only with this ws chat server http://www.codeproject.com/KB/webservices/c_sharp_web_socket_server.aspx

it supports framing (0x00 - - 0xFF), when you pick the port it returns the last , if no msg then returns none. currently it does not support data frames (0x80 - 0xFE) and no support for utf8.

Take it as an example.

Upvotes: 4

Graham Chiu
Graham Chiu

Reputation: 4886

I looked at this recently and writing a ws:// protocol does not look like it will take long, and looks to be quite straight forward. Perhaps you could try writing it yourself.

Well, since I wrote this, Endo has released his ws:// protocol

http://www.moldibi.com/rebol/ws.html

Upvotes: 1

Related Questions