I hereby claim:
- I am imanel on github.
- I am imanel (https://keybase.io/imanel) on keybase.
- I have a public key ASDNBjeRdxhvbrsg0xHoMT3s_CBrk-KFJwnzzDpRdgF9BAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
channel = Socky::Server::Channel.find_or_create('my_app', 'my_channel_name') | |
message = Socky::Server::Message.new({ | |
'event' => 'my_event', | |
'channel' => 'my_channel_name', | |
'data' => { 'my data' => 'some data' } | |
}) | |
channel.deliver(nil, message) |
request concurrency req/s failures | |
========================================== | |
1000 1 4028 0 | |
1000 11 6362 0 | |
1000 21 6448 0 | |
1000 31 6349 0 | |
1000 41 6351 0 | |
1000 51 6282 0 | |
1000 61 7141 0 | |
1000 71 6157 0 |
Sent data:
GET /chat HTTP/1.1
Host: server.example.com
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
Sec-WebSocket-Origin: http://example.com
<!-- Some JS loading JSON from /users/index.json and put it to #users via jTemplates --> | |
<div id="users"> | |
</div> | |
<script type="text/javascript" id="Templates"> | |
{#template USERS} | |
<div class="user"> | |
<p>{$T.name}</p> | |
<p>{$T.email}</p> |
# gem install fast_xor | |
module EventMachine | |
module WebSocket | |
class MaskedString < String | |
def read_mask | |
raise "Too short" if bytesize < 4 # TODO - change | |
@masking_key = String.new(self[0..3]) | |
end | |
def full_mask(start, length) |
some: args |
<html> | |
<head> | |
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js'></script> | |
<script> | |
$(document).ready(function(){ | |
function debug(str){ $("#debug").append("<p>" + str); }; | |
ws = new WebSocket("ws://localhost:8080/"); | |
ws.onmessage = function(evt) { $("#msg").append("<p>"+evt.data+"</p>"); }; | |
ws.onclose = function() { debug("socket closed"); }; |
Dr. House: it is not lupus | |
robzon: hi guys | |
marekk: no push server? | |
Bug: Those bugs everywhere :( | |
marekk: he he | |
niko: hey!? | |
robzon: where did it go..? | |
niko: «is there anybody out there?» | |
robzon: aww it's off | |
filiptepper: Hello, World! |