Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ baseline: spec
spec
for: #'squeakCommon'
do: [
spec
"spec
configuration: 'NeoJSON'
with: [
spec
versionString: #'stable';
repository: 'http://mc.stfx.eu/Neo' ];
yourself.
yourself."
spec
package: 'Zinc-Patch-HTTPSocket' with: [ spec requires: 'Zinc-HTTP' ];
package: 'Zinc-Zodiac'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
testing
testEcho
"Needs to be executed in ZnGsWebSocketTests context"
| webSocket message gemServer |
gemServer := self createGemServerMap: 'ws-echo' to: ZnWebSocketEchoHandler new.
self
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
testing
testEchoSecureWebSocketsDotOrg
"Needs to be executed in ZnGsWebSocketTests context"
| webSocket message |
true
ifTrue: [
"echo.websocket.org is no longer available. See https://github.com/GsDevKit/zinc/issues/96"
^ self ].
(Smalltalk at: #'GsSecureSocket') disableCertificateVerificationOnClient.
webSocket := self webSocketClass to: 'wss://echo.websocket.org'.
message := 'Greetings from Gemstone Smalltalk @ ' , TimeStamp now printString.
webSocket sendMessage: message.

"The following server reply line is not specified in the [RFC6455].
It is specific to echo.websocket.org server. The server is coded in Go programming language.
Implementation details:
- The hash (after by) is the return type of the os.Hostname() function (name string, err error),
it returns a string containing the host name reported by the kernel and error if any.
- The source code: https://github.com/ably/echo.websocket.org/blob/ffe04c5ff499270b04c5bf2a2db2ee30fccee50a/cmd/echo-server/main.go#L147"
self assert: webSocket readMessage equals: 'Request served by 4d896d95b55478'.

"The actual response of echo"
self assert: webSocket readMessage equals: message.
webSocket close
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ testEchoWebSocketsDotOrg
| webSocket message |
true
ifTrue: [
"echo.webserver.org is no longer available ... is no longer available. See https://github.com/GsDevKit/zinc/issues/96"
"ws://echo.webserver.org is sending 301 response (premanently moved). It has moved to secure alterantive wss://."
^ self ].
webSocket := self webSocketClass to: 'ws://echo.websocket.org'.
message := 'Greetings from Gemstone Smalltalk @ ' , TimeStamp now printString.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
testing
testStatus
"Needs to be executed in ZnGsWebSocketTests context"
| webSocket message gemServer |
gemServer := self
createGemServerMap: 'ws-status'
Expand Down
Loading