Happy !

MasashiUmezawa / Stick

Project infos

License MIT
Tags network, socket
Creation date 2016-06-10
Website

Monticello registration

About Stick

Stick

Stick is a generic socket reconnection layer.

stick := SkStick targetUrl: 'async://localhost:7000'.
stick onConnected: [ stick logger info: 'connected' ].
stick onError: [:ex | ex isReconnectEnded ifTrue: [stick stick]].
stick onReceive: [ :stream | | size data |
    data := stream next: 10.
    Transcript cr; show: data asString.
].
stick connect.

stick send: #[0 1 2 3 4 5 6 7 8 9].