Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release v2.4.3.1 #66

Merged
merged 79 commits into from
Jan 15, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
72b5fcc
Issue #58: switch Cryptography project to use GsDevKit/Cryptography p…
dalehenrich Nov 18, 2014
c1cdd64
Issue #58: run all unit tests in image ... that way we get coverage f…
dalehenrich Nov 21, 2014
5785c37
Issue #58: load NeoJSON tests now ... they should be passing?
dalehenrich Nov 21, 2014
83f418e
Issue #63: remove ZnExampleStorageRestServerDelegateTest>>testQuery .…
dalehenrich Nov 21, 2014
f652497
add logging to ZnWebSocketFrameTests>>testReadingPing since it fails …
dalehenrich Nov 21, 2014
b55918c
NeoJSON is on gs_master branch now
dalehenrich Nov 22, 2014
f8df3b4
Issue #58: get rid of some of the undefined globals and sent but not …
dalehenrich Nov 26, 2014
61361b2
Issue #58: add dependency upon GsApplicationTools for Zinc-GemStone-S…
dalehenrich Nov 26, 2014
785e1cc
Issue #58: start using ZnGemServer based on work done for https://git…
dalehenrich Nov 30, 2014
36a565d
Issue #58:
dalehenrich Nov 30, 2014
3b5c2ea
Issue #58: a log can be specified for an instance of ZnGemServer. By …
dalehenrich Nov 30, 2014
89be61e
Issue #58: tweak recent changes ... and get back to getting tests to …
dalehenrich Nov 30, 2014
df9dddb
Issue #58: ZnWebSocketTests>>testStatus passing
dalehenrich Nov 30, 2014
387c0c1
Issue #58: ZnWebSocketTests>>testEcho test passing ... in debugMode, …
dalehenrich Dec 1, 2014
641db34
Issue #58: ZnWebSocketTests>>testEchoSecureWebSocketsDotOrg requires …
dalehenrich Dec 1, 2014
7f47a99
Issue #58: ZnExampleStorageRestServerDelegateTest>>testQuery passing
dalehenrich Dec 1, 2014
c330b2e
Issue #58: a bit of cleanup to get the 3.x tests to pass(?)
dalehenrich Dec 1, 2014
7df3f86
Issue #58: now the 3.x tests should pass
dalehenrich Dec 1, 2014
e39ffad
Issue #58: use Integer>>ansiBitAt: because of a bug in 2.4.x ... turn…
dalehenrich Dec 2, 2014
2680cba
Issue #58: args to on:do: blocks required in GemStone
dalehenrich Dec 2, 2014
971a2ed
Issue #58: ZnSingleThreadedServer>>handleRequestProtected: don't pass…
dalehenrich Dec 3, 2014
035ca4f
Issue #58: add transactions to web socket delegate and some logging t…
dalehenrich Dec 3, 2014
b71ec3b
switch to ZnTranscriptLogger for debugging
dalehenrich Dec 3, 2014
117bdb5
Issue #58: Wrap ZnWebSocket stream iv by TransientValue, because GsSo…
dalehenrich Dec 3, 2014
c7ba8fb
Issue #58: ZnSingleThreadedServer>>logServerError: to unconditionally…
dalehenrich Dec 3, 2014
6f9afac
Issue #58: add halt/breakpoint handlers to ZnSingleThreadedServer>>se…
dalehenrich Dec 3, 2014
48bd27c
Issue #58: add ZnLogSupport>>object: ... for dropping an object into …
dalehenrich Dec 4, 2014
d8b7082
Issue #58: fixed{?) an accept problem whereby an accept error in Sock…
dalehenrich Dec 4, 2014
a870271
Issue #58: fix sent but not implemented
dalehenrich Dec 4, 2014
1c5e160
Issue #58: tweak ZnGemServer a bit
dalehenrich Dec 4, 2014
de801bc
Issue #58: GemServer class>>handleBreakpointException: moved to ZnGem…
dalehenrich Dec 5, 2014
99f686a
Issue #58: make ZnGemServer>>breakpointExceptionSet controllable now …
dalehenrich Dec 5, 2014
3a93f15
Issue #58: ZnLogSupport>>breakpointExceptionSet needed ... ZnRestServ…
dalehenrich Dec 6, 2014
7b1ee5e
Issue #58: flesh out remote breakpoint work ... cannot switch back to…
dalehenrich Dec 6, 2014
d79c4fd
Issue #58: remove some logging
dalehenrich Dec 6, 2014
b6d1f56
Issue #58: fix typo
dalehenrich Dec 7, 2014
e4de363
Issue #58: fiddle with logging ... remote breakpoints back on table
dalehenrich Dec 8, 2014
e29ffe6
Issue #58: fine tune logging
dalehenrich Dec 8, 2014
03318b1
Issue #58: make SocketStream and friends continuation friendly by wra…
dalehenrich Dec 9, 2014
3c2ad09
Issue #58: use GemServer>>activeProcessIsNative instead of direct cal…
dalehenrich Dec 10, 2014
000ed9b
push up some behavior/state to GemServer as I contemplate implementat…
dalehenrich Dec 10, 2014
06e353e
Issue #58: remove currentServer iv ... replaced by inherited serverIn…
dalehenrich Dec 11, 2014
3d7f41d
Issue #58: some tweaks to implementation as I flesh out ZnSeasideGemS…
dalehenrich Dec 11, 2014
ed1375d
moved UUID>>asString36 to GLASS1 (see https://github.com/GsDevKit/zin…
dalehenrich Dec 11, 2014
951b76e
Issue #58: fix calling logic for ZnGemServerLogSupport>>handleBreakpo…
dalehenrich Dec 11, 2014
a540447
Issue #46: add SpSocketError to ZnMultiThreadedServer>>readRequestTer…
dalehenrich Dec 11, 2014
15dc80d
Issue #43: move SocketStream class>>openConnectionToHost:port:timeout…
dalehenrich Dec 11, 2014
f734652
Issue #59: now pass timeout along to SocketStreamSocket
dalehenrich Dec 12, 2014
5cf3b2d
Issue #58: checkpoint (tests failing) expand use of GemServer to cove…
dalehenrich Dec 14, 2014
6aac715
Issue #58: conversion of ZnServerTests to support ZnGsServerTests ...…
dalehenrich Dec 14, 2014
6d4dd84
Issue #58: tweak options trasnfer between gemServer and ZnServer
dalehenrich Dec 14, 2014
317d3bc
Issue #58: fix up options handling ....
dalehenrich Dec 14, 2014
1d17817
Issue #58: by jove I think she's got it
dalehenrich Dec 14, 2014
1f6929a
Issue #65: expected failure for 2.4.x and ZnGsServerTests>>testError
dalehenrich Dec 14, 2014
35db291
Issue #58: rename breakpointExceptionSet to gemServerExceptionSet
dalehenrich Dec 20, 2014
8e8f831
add travis-ci hook for gitter
dalehenrich Dec 20, 2014
62385cf
Issue #58: mods to be minimally compatible with GsApplicationTools v1…
dalehenrich Jan 6, 2015
6f6f220
Issue #58: replace GemServerRegistry ref with ref to GemServer
dalehenrich Jan 6, 2015
c644581
Issue #58: use dev branch for GsApplicationTools
dalehenrich Jan 6, 2015
18cf832
Issue #58: replacing use of ports with portOrResourceNameList in GemS…
dalehenrich Jan 6, 2015
cd878d5
added GemServer>>ports and GemServer>>ports: so ports not needed locally
dalehenrich Jan 7, 2015
ced6f10
Issue #58: change GsApplicationTools project reference back to: gsApp…
dalehenrich Jan 8, 2015
c453ed5
Issue #69: push ZnGemServer up to ZnAbstractGemServer and create sibl…
dalehenrich Jan 8, 2015
1a79dd0
Issue #69: add ZnNewGsServerTests for testing ZnNewGemServer ... thes…
dalehenrich Jan 9, 2015
164d54b
Issue #69: logging in ZnServerTests>>testError ... tracking travis o…
dalehenrich Jan 9, 2015
10cd5dc
Issue #69: start work adding persitence tests for http server additio…
dalehenrich Jan 9, 2015
e2b58a9
Issue #69: added first transactional test ... patch mistake in ZnServ…
dalehenrich Jan 9, 2015
8aa8151
issue #69: pushed up to GsApplicationTools v1.0.2 (not yet released)
dalehenrich Jan 10, 2015
140c650
Issue #69: GsApplicationTools v1.0.2 integrated .... leave HTTP error…
dalehenrich Jan 12, 2015
04a7d0c
Issue #69: fix mistake in tag spec for baseline ... start adding supp…
dalehenrich Jan 12, 2015
1cbc0a4
Issue #69: more testError logging sheesh!
dalehenrich Jan 12, 2015
9212de0
Issue #69: more test fiddling ... not seeing travis failures locallly
dalehenrich Jan 12, 2015
1470765
Issue #69: checkpoint converting WebSocket example to use ZnNewGemSer…
dalehenrich Jan 12, 2015
d90c760
Issue #69: error logging in tests
dalehenrich Jan 12, 2015
2a4a3c0
Issue #69: I think I fixed some of the errors that were causing rando…
dalehenrich Jan 12, 2015
7c6803f
Issue #69: web socket chat room has transactions implemented ... with…
dalehenrich Jan 15, 2015
a5c68d2
Issue #69: transactional and non-transactional webSocket examples are…
dalehenrich Jan 15, 2015
c4d1688
Issue #69: going after 2.x test failures
dalehenrich Jan 15, 2015
f436c90
Merge pull request #70 from GsDevKit/issue_69
dalehenrich Jan 15, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
language: erlang

notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/c59e6bffa0b41a693676 # GsDevKit/chat (public)
on_success: always # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: false # default: false

env:
- ST=GemStone-2.4.4.1
# - ST=GemStone-2.4.4.7
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,22 +121,27 @@ baseline: spec
configuration: 'GsPharo'
with: [
spec
version: '0.9.2';
version: '0.9.3';
repository: 'http://seaside.gemtalksystems.com/ss/PharoCompat' ];
configuration: 'Cryptography'
baseline: 'Cryptography'
with: [
spec
versionString: #'stable';
repository: 'http://seaside.gemtalksystems.com/ss/Cryptography' ];
baseline: 'NeoJSON'
loads: #('Cryptography');
repository: 'github://GsDevKit/Cryptography:master/repository' ];
baseline: 'GsApplicationTools'
with: [
spec
loads: 'Core';
repository: 'github://GsDevKit/NeoJSON:master/repository' ];
loads: #('Core');
repository:
'github://GsDevKit/gsApplicationTools:v1.?/repository' ];
baseline: 'NeoJSON'
with: [ spec repository: 'github://GsDevKit/NeoJSON:gs_master/repository' ];
yourself.
spec
package: 'SocketStream';
package: 'Zinc-FileSystem-Legacy' with: [ spec requires: #('GLASS1') ];
package: 'Zinc-GemStone-Server-Tools'
with: [ spec requires: #('GsApplicationTools') ];
package: 'Zinc-WebSocket-Core'
with: [ spec requires: #('Zinc-HTTP' 'Cryptography') ];
package: 'Zinc-HTTP'
Expand All @@ -146,7 +151,8 @@ baseline: spec
includes: #('SocketStream') ];
package: 'Zinc-Tests' with: [ spec requires: #('GsPharo') ].
spec
group: 'CI' with: #('REST');
group: 'Core' with: #('Zinc-GemStone-Server-Tools');
group: 'CI' with: #('REST' 'WebSocket');
yourself ].
spec
for: #'gs2.x'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"class" : {
},
"instance" : {
"baseline:" : "dkh 11/17/2014 18:15" } }
"baseline:" : "dkh 01/12/2015 10:56" } }
Original file line number Diff line number Diff line change
@@ -1 +1 @@
(name 'BaselineOfZincHTTPComponents-dkh.10' message 'Issue #58: pull WebSockt from CI group ... interested in seeing how things are for NeoJSON and and zinc core' id '3b28664e-1ba7-4d76-aff5-e5c89eb2236b' date '11/17/2014' time '18:16:16' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.9' message 'Issue #60: reference GsDevKit/NeoJSON directory and only load Core, since NeoJSON tests are known not to pass: https://github.com/GsDevKit/NeoJSON/issues/3' id '73c88fdd-cbe7-4a5c-8485-923f314c6c44' date '11/17/2014' time '18:14:59' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.8' message 'Issue #58: re-enable websocket as part of CI ... this will take longer to get straightened out as both NeoJSON and WebSockets have issues' id '342aa976-a532-4d8b-a428-6e7cb9111a41' date '11/17/2014' time '18:03:43' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.7' message 'Issue #58: disable web-socket test load for ''CI'' until Cryptography load issue resolvedIssue #60: fix NeoJSON specification and add ''REST'' to ''CI'' group ... defer reference to GsDevKit/NeoJSON project until travis tests have been enabled ...' id 'fec29f56-7062-41a6-85d2-9d7a439559e4' date '11/17/2014' time '16:33:26' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.6' message 'Issue #58: cryptography configuration needed updating, so added stable version while I was at it ...' id '00296be5-2d30-418d-a474-2f373393e313' date '11/01/2014' time '13:00:26' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.5' message 'Issue #58: no stable version defined in the current Cryptography configuration...' id '67a67e96-6cf9-4c32-a87a-9e3d8bc3d647' date '11/01/2014' time '12:46:46' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.4' message 'Issue #58: create CI group to specifiy packages to be loaded by travis-ci for testing ... for GemStone that includes Zinc-WebSocket-Tests ... expect failures since Cryptography project is not up to snuff...yet' id '15af9af6-9829-412c-be6b-70cdc7fda24a' date '11/01/2014' time '12:28:52' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.3' message 'Issue #55: bump mcz version of the gs_master branch BaselineOfZincHTTPComponents, to avoid duplice mcz versions' id 'e175a78c-9a07-4da1-97a2-96eb0d40ba96' date '10/27/2014' time '15:10:49' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.2' message 'restore Zodiac packages and groups to configuration ... not ported to GemStone yet, see Issue #55 for details' id '6311a4fb-03de-42dc-81c7-b96971d30368' date '10/15/2014' time '11:55:57' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-JohanBrichau.1' message 'renamed BaselineOfZinc to BaselineOfZincHTTPComponents' id 'e022a66b-5bb4-47eb-b582-74a3ebaa1f9e' date '07/09/2014' time '21:16:19' author 'JohanBrichau' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())
(name 'BaselineOfZincHTTPComponents-dkh.19' message 'Issue #69: fix mistake in tag spec for baseline ... start adding support for Rest transactional example' id 'b8134660-25eb-46d5-9cbb-b4c4fe2b21d7' date '01/12/2015' time '10:58:15' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.18' message 'Issue #58: change GsApplicationTools project reference back to: gsApplicationTools:v.1.?' id 'f297e739-5425-4c6e-8262-3039ca36e341' date '01/07/2015' time '16:20:29' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.17' message 'Issue #58: use dev branch for GsApplicationTools' id '72892950-b7c5-4a4c-b40a-5cfd0b98688a' date '01/06/2015' time '15:14:41' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.16' message 'Issue #58: mods to be minimally compatible with GsApplicationTools v1.0.0' id '34566c61-ca88-4eaf-b4ad-2149de6755fe' date '01/06/2015' time '11:59:55' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.15' message 'Issue #58: ZnSingleThreadedServer>>handleRequestProtected: don''t pass the exception ... debugMode doesn''t quite appy to GemStone ... need different granularity I think ... GsPharo 0.9.2 needs to be used' id '6f7305be-3dbd-40f9-a81f-3f920132534e' date '12/02/2014' time '16:29:14' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.14' message 'Issue #58: add dependency upon GsApplicationTools for Zinc-GemStone-Server-Tools, a new package which holds ZnServerStarter class needed by web socket tests ...' id 'e09422d2-1065-4ceb-8845-084f10a4c4f7' date '11/26/2014' time '13:39:44' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.13' message 'NeoJSON is on gs_master branch now' id 'f6fdee09-f8c6-4738-907c-215a6eae7bcf' date '11/22/2014' time '12:39:05' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.12' message 'Issue #58: load NeoJSON tests now ... they should be passing?' id '71ee4921-b3f1-4550-bec2-277fe6363086' date '11/20/2014' time '17:43:32' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.11' message 'Issue #58: switch Cryptography project to use GsDevKit/Cryptography project and add backin into CI group, since the project should now load without errors' id '7602ba2b-54cc-45de-a7ad-567191c9b1c5' date '11/18/2014' time '12:09:24' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.10' message 'Issue #58: pull WebSockt from CI group ... interested in seeing how things are for NeoJSON and and zinc core' id '3b28664e-1ba7-4d76-aff5-e5c89eb2236b' date '11/17/2014' time '18:16:16' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.9' message 'Issue #60: reference GsDevKit/NeoJSON directory and only load Core, since NeoJSON tests are known not to pass: https://github.com/GsDevKit/NeoJSON/issues/3' id '73c88fdd-cbe7-4a5c-8485-923f314c6c44' date '11/17/2014' time '18:14:59' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.8' message 'Issue #58: re-enable websocket as part of CI ... this will take longer to get straightened out as both NeoJSON and WebSockets have issues' id '342aa976-a532-4d8b-a428-6e7cb9111a41' date '11/17/2014' time '18:03:43' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.7' message 'Issue #58: disable web-socket test load for ''CI'' until Cryptography load issue resolvedIssue #60: fix NeoJSON specification and add ''REST'' to ''CI'' group ... defer reference to GsDevKit/NeoJSON project until travis tests have been enabled ...' id 'fec29f56-7062-41a6-85d2-9d7a439559e4' date '11/17/2014' time '16:33:26' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.6' message 'Issue #58: cryptography configuration needed updating, so added stable version while I was at it ...' id '00296be5-2d30-418d-a474-2f373393e313' date '11/01/2014' time '13:00:26' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.5' message 'Issue #58: no stable version defined in the current Cryptography configuration...' id '67a67e96-6cf9-4c32-a87a-9e3d8bc3d647' date '11/01/2014' time '12:46:46' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.4' message 'Issue #58: create CI group to specifiy packages to be loaded by travis-ci for testing ... for GemStone that includes Zinc-WebSocket-Tests ... expect failures since Cryptography project is not up to snuff...yet' id '15af9af6-9829-412c-be6b-70cdc7fda24a' date '11/01/2014' time '12:28:52' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.3' message 'Issue #55: bump mcz version of the gs_master branch BaselineOfZincHTTPComponents, to avoid duplice mcz versions' id 'e175a78c-9a07-4da1-97a2-96eb0d40ba96' date '10/27/2014' time '15:10:49' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.2' message 'restore Zodiac packages and groups to configuration ... not ported to GemStone yet, see Issue #55 for details' id '6311a4fb-03de-42dc-81c7-b96971d30368' date '10/15/2014' time '11:55:57' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-JohanBrichau.1' message 'renamed BaselineOfZinc to BaselineOfZincHTTPComponents' id 'e022a66b-5bb4-47eb-b582-74a3ebaa1f9e' date '07/09/2014' time '21:16:19' author 'JohanBrichau' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
as yet unclassified
openConnectionToHost: host port: portNumber timeout: timeoutSeconds
| socket |
socket := SocketStreamSocket newTCPSocket.
socket connectTo: host port: portNumber timeout: timeoutSeconds.
^ (self on: socket)
timeout: timeoutSeconds;
yourself
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
as yet unclassified
close
"Flush any data still not sent
"Flush any data still not sent
and take care of the socket."

self flush.
socket close.
self destroy.
[ self flush ]
ensure: [
self socket close.
self destroy ]
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
as yet unclassified
destroy
"Destroy the receiver and its underlying socket. Does not attempt to flush the output buffers. For a graceful close use SocketStream>>close instead."
socket ifNotNil: [socket close]
"Destroy the receiver and its underlying socket. Does not attempt to flush the output buffers. For a graceful close use SocketStream>>close instead."

socket ifNotNil: [ self socket close ]
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
as yet unclassified
flush
"If the other end is connected and we have something
"If the other end is connected and we have something
to send, then we send it and reset the outBuffer."

((outNextToWrite > 1) and: [socket isActive])
ifTrue: [
[socket sendData: outBuffer count: outNextToWrite - 1]
on: ConnectionTimedOut
do: [:ex | shouldSignal ifFalse: ["swallow"]].
outNextToWrite := 1]
(outNextToWrite > 1 and: [ self socket isActive ])
ifTrue: [
[ self socket sendData: outBuffer count: outNextToWrite - 1 ]
on: ConnectionTimedOut
do: [ :ex |
shouldSignal
ifFalse: [
"swallow"
] ].
outNextToWrite := 1 ]
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
as yet unclassified
flushComet
"Flushes the receiver and answer if the socket is still in a valid state and both ends are properly connected. Free the socket, as a side-effect if there is a problem."

| result |
result := [ self flush. true ]
on: NetworkError
do: [ :err | false ].
result := result and: [ self isConnected and: [ self isOtherEndConnected ] ].
result ifFalse: [ socket destroy ].
^ result
"Flushes the receiver and answer if the socket is still in a valid state and both ends are properly connected. Free the socket, as a side-effect if there is a problem."

| result |
result := [
self flush.
true ]
on: NetworkError
do: [ :err | false ].
result := result and: [ self isConnected and: [ self isOtherEndConnected ] ].
result
ifFalse: [ self socket destroy ].
^ result
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
as yet unclassified
isConnected
"The stream is connected if the socket is."
"The stream is connected if the socket is."

^socket isConnected
^ self socket isConnected
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
as yet unclassified
isDataAvailable
"It the inbuffer is empty, we check the socket for data.
"It the inbuffer is empty, we check the socket for data.
If it claims to have data available to read, we try to read
some once and recursively call this method again.
If something really was available it is now in the inBuffer.
This is because there has been spurious
dataAvailable when there really is no data to get."

self isInBufferEmpty ifFalse: [^true].
^socket dataAvailable
ifFalse: [false]
ifTrue: [self receiveDataIfAvailable; isDataAvailable]

self isInBufferEmpty
ifFalse: [ ^ true ].
^ self socket dataAvailable
ifFalse: [ false ]
ifTrue: [
self
receiveDataIfAvailable;
isDataAvailable ]
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
as yet unclassified
isOtherEndConnected
^socket isConnected
^ self socket isConnected
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
as yet unclassified
nextPutAllFlush: aCollection
"Put a String or a ByteArray onto the stream.
"Put a String or a ByteArray onto the stream.
You can use this if you have very large data - it avoids
copying into the buffer (and avoids buffer growing)
and also flushes any other pending data first."

| toPut |
toPut := binary ifTrue: [aCollection asByteArray] ifFalse: [aCollection asString].
self flush. "first flush pending stuff, then directly send"
socket isConnected ifTrue: [
[socket sendData: toPut count: toPut size]
on: ConnectionTimedOut
do: [:ex | shouldSignal ifFalse: ["swallow"]]]
| toPut |
toPut := binary
ifTrue: [ aCollection asByteArray ]
ifFalse: [ aCollection asString ].
self flush. "first flush pending stuff, then directly send"
self socket isConnected
ifTrue: [
[ self socket sendData: toPut count: toPut size ]
on: ConnectionTimedOut
do: [ :ex |
shouldSignal
ifFalse: [
"swallow"
] ] ]
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
as yet unclassified
receiveAvailableData
"Receive available data (as much as fits in the inBuffer)
"Receive available data (as much as fits in the inBuffer)
but not waiting for more to arrive.
Return the position in the buffer where the
new data starts, regardless if anything
was read, see #adjustInBuffer."

recentlyRead := socket receiveAvailableDataInto: inBuffer startingAt: inNextToWrite.
^self adjustInBuffer: recentlyRead

recentlyRead := self socket
receiveAvailableDataInto: inBuffer
startingAt: inNextToWrite.
^ self adjustInBuffer: recentlyRead
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
as yet unclassified
receiveData
"Receive data with timeout if it has been set.
"Receive data with timeout if it has been set.
If shouldSignal is false we use the Socket methods
that swallow those Exceptions, if it is true the
caller will have to handle those Exceptions.
Return the position in the buffer where the
new data starts, regardless if anything
was read, see #adjustInBuffer."

recentlyRead := shouldSignal ifTrue: [
self shouldTimeout ifTrue: [
socket receiveDataSignallingTimeout: timeout
into: inBuffer startingAt: inNextToWrite]
ifFalse: [
socket receiveDataSignallingClosedInto: inBuffer
startingAt: inNextToWrite]]
ifFalse: [
self shouldTimeout ifTrue: [
"This case is tricky, if it times out and is swallowed

recentlyRead := shouldSignal
ifTrue: [
self shouldTimeout
ifTrue: [
self socket
receiveDataSignallingTimeout: timeout
into: inBuffer
startingAt: inNextToWrite ]
ifFalse: [ self socket receiveDataSignallingClosedInto: inBuffer startingAt: inNextToWrite ] ]
ifFalse: [
self shouldTimeout
ifTrue: [
"This case is tricky, if it times out and is swallowed
how does other methods calling this method repeatedly
get to know that? And what should they do?"
socket receiveDataTimeout: timeout
into: inBuffer startingAt: inNextToWrite]
ifFalse: [
socket receiveDataInto: inBuffer
startingAt: inNextToWrite]].
^self adjustInBuffer: recentlyRead
self socket
receiveDataTimeout: timeout
into: inBuffer
startingAt: inNextToWrite ]
ifFalse: [ self socket receiveDataInto: inBuffer startingAt: inNextToWrite ] ].
^ self adjustInBuffer: recentlyRead
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
as yet unclassified
receiveDataIfAvailable
"Only used to check that there really is data to read
"Only used to check that there really is data to read
from the socket after it signals dataAvailable.
It has been known to signal true and then still
not have anything to read. See also isDataAvailable.
Return the position in the buffer where the
new data starts, regardless if anything
was read, see #adjustInBuffer."

recentlyRead := socket receiveSomeDataInto: inBuffer startingAt: inNextToWrite.
^self adjustInBuffer: recentlyRead
recentlyRead := self socket
receiveSomeDataInto: inBuffer
startingAt: inNextToWrite.
^ self adjustInBuffer: recentlyRead
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
as yet unclassified
socket: aSocket
socket := aSocket
socket := TransientStackValue value: aSocket
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
as yet unclassified
socket
^socket
^ socket value
Loading