On 15 Mar 2012, at 18:58, Eliot Miranda wrote: > In trunk (and in my Cog vm source) they are in the directories > > http://squeakvm.org/svn/squeak/trunk/platforms/{Cross,Mac > OS,unix,win32}/plugins/SocketPlugin > > i.e. in all VMs locate the relevant platforms hierarchy and look in > platforms/{Cross,Mac OS,unix,win32}/plugins/SocketPlugin.
Thank you, Eliot. Sven > On 09 Mar 2012, at 16:44, Sven Van Caekenberghe wrote: > > > Most socket API's allow for the creation of a server socket on the next > > available port, often by specifying 0 instead of a port. When the socket is > > bound, one can retrieve the local port and let the client(s) know. I tried > > to do that in Pharo today, and these steps seem to work, by accepting an > > incoming connection gives a primitive failed. > > > > Anyone tried this ? > > > > | socket | > > socket := Socket newTCP. > > socket listenOn: 0. > > [ [ > > Transcript crShow: 'Port is ', socket localPort printString. > > (socket waitForAcceptFor: 60) > > ifNotNil: [ :client | | data | > > data := client receiveDataTimeout: 30. > > Transcript crShow: 'Received ', data asString. > > data ifNotNil: [ client sendData: data reverse; close > > ] > > ]. > > ] ensure: [ socket close ] ] fork. > > > > I am running the Pharo Cog VM on Mac OS X using Pharo 1.4. > > > > Thx, > > > > Sven > > > > > > >
smime.p7s
Description: S/MIME cryptographic signature
