fixed a bug in socket accept

This commit is contained in:
hyunghwan.chung
2018-01-14 15:11:53 +00:00
parent 2b56b1c2b0
commit 2255425b3f
3 changed files with 11 additions and 4 deletions

View File

@ -242,7 +242,7 @@ class(#pointer) Y(X)
class Socket(Object) from 'sck'
{
var handle := -1.
var(#get) handle := -1.
var insem, outsem.
var(#get,#set) inputAction, outputAction.
@ -491,9 +491,11 @@ error -> exception
newaddr := SocketAddress new.
newsck := sck accept: newaddr.
System log: 'new connection - '; logNl: newaddr.
System log: 'new connection - '; log: newaddr; log: ' '; log: (newsck handle); logNl.
newsck inputAction: inact; outputAction: outact.
newsck watchInput; watchOuptut.
newsck watchInput; watchOutput.
].
[