Will the real sqUnixSocket.c step forward?
John M McIntosh
johnmci at smalltalkconsulting.com
Thu May 2 19:26:37 UTC 2002
>
>Hopefully John, Ian and Lex can work through the current code and get it
>working. And then we need to decide what to do with the Unix port at
>SF. IMHO we
>need to have Ian "with us" - let's just find a good "procedure" for this.
>
>regards, Göran
>
>Göran Hultgren, goran.hultgren at bluefish.se
>GSM: +46 70 3933950, http://www.bluefish.se
>\"Department of Redundancy department.\" -- ThinkGeek
Well the fix exposed a problem with the code.
Now correct me if I'm wrong, but I don't think CONN_NOTIFY flag is
actually set anywhere?
Thus you don't get the notification an incoming connection has occured.
From my notes on
http://www.smalltalkconsulting.com/html/OTNotes1.html
I've
"The need to signal {the connect semaphore} flag is sent when
sqSocketAcceptFromRecvBytesSendBytesSemaID is called.
sqSocketCloseConnection is called.
Or when socket is bound to a port. This binding occurs when
sqSocketListenOnPort
sqSocketListenOnPortBacklogSize
sqSocketAcceptFromRecvBytesSendBytesSemaID
sqSocketConnectToPort"
Therefore I'd guess in
sqSocketAcceptFromRecvBytesSendBytesSemaID
You need to ensure the serverSocket is able to tap the semaphore again.
PSP(serverSocket)->pendingEvents= CONN_NOTIFY; //might be wrongly coding
since it gets reset in the notify handler.
in
sqSocketCloseConnection
pss->pendingEvents |= CONN_NOTIFY;
say before
aioDisable(SOCKET(s));
in
sqSocketListenOnPortBacklogSize
pss->pendingEvents |= CONN_NOTIFY;
say before
listen(SOCKET(s), backlogSize);
?I don't think UDP cares? does it? how does the smalltalk code read?
in
sqSocketConnectToPort
pss->pendingEvents |= CONN_NOTIFY;
say before the
aioEnable(SOCKET(s), PSP(s), 0);
?I don't think UDP cares? does it? how does the smalltalk code read?
of course sqSocketListenOnPort
falls thru to sqSocketListenOnPortBacklogSize
so that's ok.
--
--
===========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
===========================================================================
More information about the Squeak-dev
mailing list
|