I've installed the latest version of WebClient from the metacello configuration, and when I run WebSocket example I get the following output in the Transcript:
ConnectionClosed: Connection closed while waiting for data.
[ConnectionClosed signal: 'Connection closed while waiting for data.'] in Socket>>waitForDataFor:
Socket>>waitForDataFor:ifClosed:ifTimedOut:
Socket>>receiveDataSignallingTimeout:into:startingAt:
SocketStream>>receiveData
whileTrue: [self readMessage.
self handleMessage: frameData type: frameType].
nil] in [[[stream isConnected]
whileTrue: [self readMessage.
self handleMessage: frameData type: frameType].
do: [:ex | self handleError: ex]] in WebSocket>>run
whileTrue: [self readMessage.
self handleMessage: frameData type: frameType].
do: [:ex | self handleError: ex]] in WebSocket>>run
Transcript cr; show: 'New ' , ws.
onMessage: [:data | mutex
do: [:s | s send: data]]].
onClose: [Transcript cr; show: 'Closing ' , ws.
Transcript cr; show: ex description.
Transcript cr; show: ex signalerContext longStack].
critical: [sockets add: ws].
ws run] in WebSocket class>>example
WebServer>>invokeAction:request:
invokeAction: (action at: 2)
request: request] in WebServer>>dispatchRequest:url:
WebServer>>dispatchRequest:url:
WebServer>>dispatchRequest:
ifNil: [stream := SocketStream on: aSocket]
ifNotNil: [ssl := Smalltalk
ifAbsent: [self error: 'SqueakSSL not installed'].
stream := ssl secureSocketStream on: aSocket.
[stream sslAccept: certName]
ifNil: [^ aSocket destroy].
request := self newRequest.
[request readFrom: stream]
(ex isKindOf: NetworkError)
ifFalse: [[request send400Response]
self dispatchRequest: request].
nil] in WebServer>>handleConnectionFrom:
WebServer>>handleConnectionFrom:
[self handleConnectionFrom: aSocket] in [[self handleConnectionFrom: aSocket]
do: [:ex | aSocket destroy].
remove: Processor activeProcess
ifAbsent: []]] in [[[self handleConnectionFrom: aSocket]
do: [:ex | aSocket destroy].
remove: Processor activeProcess
ensure: [aSocket destroy]] in WebServer>>asyncHandleConnectionFrom:
[[self handleConnectionFrom: aSocket]
do: [:ex | aSocket destroy].
remove: Processor activeProcess
ifAbsent: []]] in [[[self handleConnectionFrom: aSocket]
do: [:ex | aSocket destroy].
remove: Processor activeProcess
ensure: [aSocket destroy]] in WebServer>>asyncHandleConnectionFrom:
[[[self handleConnectionFrom: aSocket]
do: [:ex | aSocket destroy].
remove: Processor activeProcess
ensure: [aSocket destroy]] in WebServer>>asyncHandleConnectionFrom:
Processor terminateActive] in BlockClosure>>newProcess
ConnectionClosed: Connection closed while waiting for data.
[ConnectionClosed signal: 'Connection closed while waiting for data.'] in Socket>>waitForDataFor:
Socket>>waitForDataFor:ifClosed:ifTimedOut:
Socket>>receiveDataSignallingTimeout:into:startingAt:
SocketStream>>receiveData
whileTrue: [self readMessage.
self handleMessage: frameData type: frameType].
nil] in [[[stream isConnected]
whileTrue: [self readMessage.
self handleMessage: frameData type: frameType].
do: [:ex | self handleError: ex]] in WebSocket>>run
whileTrue: [self readMessage.
self handleMessage: frameData type: frameType].
do: [:ex | self handleError: ex]] in WebSocket>>run
Transcript cr; show: 'New ' , ws.
onMessage: [:data | mutex
do: [:s | s send: data]]].
onClose: [Transcript cr; show: 'Closing ' , ws.
Transcript cr; show: ex description.
Transcript cr; show: ex signalerContext longStack].
critical: [sockets add: ws].
ws run] in WebSocket class>>example
WebServer>>invokeAction:request:
invokeAction: (action at: 2)
request: request] in WebServer>>dispatchRequest:url:
WebServer>>dispatchRequest:url:
WebServer>>dispatchRequest:
ifNil: [stream := SocketStream on: aSocket]
ifNotNil: [ssl := Smalltalk
ifAbsent: [self error: 'SqueakSSL not installed'].
stream := ssl secureSocketStream on: aSocket.
[stream sslAccept: certName]
ifNil: [^ aSocket destroy].
request := self newRequest.
[request readFrom: stream]
(ex isKindOf: NetworkError)
ifFalse: [[request send400Response]
self dispatchRequest: request].
nil] in WebServer>>handleConnectionFrom:
WebServer>>handleConnectionFrom:
[self handleConnectionFrom: aSocket] in [[self handleConnectionFrom: aSocket]
do: [:ex | aSocket destroy].
remove: Processor activeProcess
ifAbsent: []]] in [[[self handleConnectionFrom: aSocket]
do: [:ex | aSocket destroy].
remove: Processor activeProcess
ensure: [aSocket destroy]] in WebServer>>asyncHandleConnectionFrom:
[[self handleConnectionFrom: aSocket]
do: [:ex | aSocket destroy].
remove: Processor activeProcess
ifAbsent: []]] in [[[self handleConnectionFrom: aSocket]
do: [:ex | aSocket destroy].
remove: Processor activeProcess
ensure: [aSocket destroy]] in WebServer>>asyncHandleConnectionFrom:
[[[self handleConnectionFrom: aSocket]
do: [:ex | aSocket destroy].
remove: Processor activeProcess
ensure: [aSocket destroy]] in WebServer>>asyncHandleConnectionFrom:
Processor terminateActive] in BlockClosure>>newProcess
listener terminating, socket: waitingForConnection
listener starting (interface: * port: 8080)The method SmalltalkImage platformName has been deprecated.
Use Smalltalk os platformName
ConnectionClosed: Connection closed while waiting for data.
[ConnectionClosed signal: 'Connection closed while waiting for data.'] in Socket>>waitForDataFor:
Socket>>waitForDataFor:ifClosed:ifTimedOut:
Socket>>receiveDataSignallingTimeout:into:startingAt:
SocketStream>>receiveData
whileTrue: [self readMessage.
self handleMessage: frameData type: frameType].
nil] in [[[stream isConnected]
whileTrue: [self readMessage.
self handleMessage: frameData type: frameType].
do: [:ex | self handleError: ex]] in WebSocket>>run
whileTrue: [self readMessage.
self handleMessage: frameData type: frameType].
do: [:ex | self handleError: ex]] in WebSocket>>run
Transcript cr; show: 'New ' , ws.
onMessage: [:data | mutex
do: [:s | s send: data]]].
onClose: [Transcript cr; show: 'Closing ' , ws.
Transcript cr; show: ex description.
Transcript cr; show: ex signalerContext longStack].
critical: [sockets add: ws].
ws run] in WebSocket class>>example
WebServer>>invokeAction:request:
invokeAction: (action at: 2)
request: request] in WebServer>>dispatchRequest:url:
WebServer>>dispatchRequest:url:
WebServer>>dispatchRequest:
ifNil: [stream := SocketStream on: aSocket]
ifNotNil: [ssl := Smalltalk
ifAbsent: [self error: 'SqueakSSL not installed'].
stream := ssl secureSocketStream on: aSocket.
[stream sslAccept: certName]
ifNil: [^ aSocket destroy].
request := self newRequest.
[request readFrom: stream]
(ex isKindOf: NetworkError)
ifFalse: [[request send400Response]
self dispatchRequest: request].
nil] in WebServer>>handleConnectionFrom:
WebServer>>handleConnectionFrom:
[self handleConnectionFrom: aSocket] in [[self handleConnectionFrom: aSocket]
do: [:ex | aSocket destroy].
remove: Processor activeProcess
ifAbsent: []]] in [[[self handleConnectionFrom: aSocket]
do: [:ex | aSocket destroy].
remove: Processor activeProcess
ensure: [aSocket destroy]] in WebServer>>asyncHandleConnectionFrom:
[[self handleConnectionFrom: aSocket]
do: [:ex | aSocket destroy].
remove: Processor activeProcess
ifAbsent: []]] in [[[self handleConnectionFrom: aSocket]
do: [:ex | aSocket destroy].
remove: Processor activeProcess
ensure: [aSocket destroy]] in WebServer>>asyncHandleConnectionFrom:
[[[self handleConnectionFrom: aSocket]
do: [:ex | aSocket destroy].
remove: Processor activeProcess
ensure: [aSocket destroy]] in WebServer>>asyncHandleConnectionFrom:
Processor terminateActive] in BlockClosure>>newProcess