eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'HTTPInterface::WebSocketStream':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: WebSocketStream (private in HTTPInterface

This class is only visible from within HTTPInterface.

Inheritance:

   Object
   |
   +--Stream
      |
      +--HTTPInterface::WebSocketStream

Package:
stx:goodies/communication
Category:
Net-Communication-HTTP-Client
Owner:
HTTPInterface
Author:
Claus Gittinger

Description:


I handle the websocket protocol.
When reading, I will retrieve whole packets;
when writing, I'll send whole packets.


[instance variables:]

[class variables:]


Related information:



Class protocol:

debugging
o  verbose: aBoolean
self verbose:true
self verbose:false
self verboseProtocol:true
self verboseProtocol:false

o  verboseProtocol: aBoolean
self verbose:true
self verbose:false
self verboseProtocol:true
self verboseProtocol:false

initialization
o  initializeConstants

instance creation
o  new
return an initialized instance

o  onSocket: aSocket
return an initialized instance


Instance protocol:

accessing
o  next
return the next message (i.e. package)

o  nextPut: aPackage
send a message (i.e. package)

o  on: event do: aBlock
register an event listener

o  socket: aSocket

initialization & release
o  close
careful to not terminate myself too early

o  initialize
(comment from inherited method)
just to ignore initialize to objects which do not need it

processes
o  notify: event with: payload orElse: aBlock
tell listeners or if there are no listeners,
evaluate aBlock (which usually puts it into the receive queue)

o  readerProcessLoop
reads all incoming packets and puts them into the receiveQueue or notifies any listener

o  startProcesses

o  writerProcessLoop
shuffles all packets from the sendQueue to the socket

protocol helpers
o  decodeFrameHybi17: data
1:1 translation from JavaScript to Smalltalk

o  encodeFrameHybi17: payload
1:1 translation from JavaScript to Smalltalk



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Tue, 19 Mar 2024 08:34:25 GMT