|
Class: WebSocketStream (private in HTTPInterface
This class is only visible from within
HTTPInterface.
Object
|
+--Stream
|
+--HTTPInterface::WebSocketStream
- Package:
- stx:goodies/communication
- Category:
- Net-Communication-HTTP-Client
- Owner:
- HTTPInterface
- Author:
- Claus Gittinger
I handle the websocket protocol.
When reading, I will retrieve whole packets;
when writing, I'll send whole packets.
[instance variables:]
[class variables:]
debugging
-
verbose: aBoolean
-
self verbose:true
self verbose:false
self verboseProtocol:true
self verboseProtocol:false
-
verboseProtocol: aBoolean
-
self verbose:true
self verbose:false
self verboseProtocol:true
self verboseProtocol:false
initialization
-
initializeConstants
-
instance creation
-
new
-
return an initialized instance
-
onSocket: aSocket
-
return an initialized instance
accessing
-
next
-
return the next message (i.e. package)
-
nextPut: aPackage
-
send a message (i.e. package)
-
on: event do: aBlock
-
register an event listener
-
socket: aSocket
-
initialization & release
-
close
-
careful to not terminate myself too early
-
initialize
-
(comment from inherited method)
just to ignore initialize to objects which do not need it
processes
-
notify: event with: payload orElse: aBlock
-
tell listeners or if there are no listeners,
evaluate aBlock (which usually puts it into the receive queue)
-
readerProcessLoop
-
reads all incoming packets and puts them into the receiveQueue or notifies any listener
-
startProcesses
-
-
writerProcessLoop
-
shuffles all packets from the sendQueue to the socket
protocol helpers
-
decodeFrameHybi17: data
-
1:1 translation from JavaScript to Smalltalk
-
encodeFrameHybi17: payload
-
1:1 translation from JavaScript to Smalltalk
|