changed Socket.moo a little
This commit is contained in:
parent
80e909caf1
commit
c2504848e5
@ -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.
|
||||||
|
Loading…
Reference in New Issue
Block a user