changed Socket.moo a little

This commit is contained in:
hyunghwan.chung 2018-01-19 13:37:38 +00:00
parent 80e909caf1
commit c2504848e5

View File

@ -466,7 +466,8 @@ error -> exception
outact := [:sck :state | outact := [:sck :state |
if (state) if (state)
{ {
sck writeBytes: #[ $h, $e, $l, $l, $o, C'\n' ]. [ sck writeBytes: #[ $h, $e, $l, $l, $o, C'\n' ] ]
on: Exception do: [:ex | sck close. ].
} }
else else
{ {
@ -505,7 +506,7 @@ error -> exception
[ [
s := Socket domain: Socket.Domain.INET type: Socket.Type.STREAM. s := Socket domain: Socket.Domain.INET type: Socket.Type.STREAM.
s inputAction: inact; outputAction: outact. s inputAction: inact; outputAction: outact.
s connectTo: (SocketAddress fromString: '192.168.1.108:9999') do: conact. s connectTo: (SocketAddress fromString: '127.0.0.1:9999') do: conact.
s2 := Socket domain: Socket.Domain.INET type: Socket.Type.STREAM. s2 := Socket domain: Socket.Domain.INET type: Socket.Type.STREAM.
s2 inputAction: accact. s2 inputAction: accact.