Herbert said<br><br>&lt;&lt;Some code:<br>
<br>
Socket initializeNetwork  &quot;Only once per image&quot;<br>
dst := Socket newUDP setPort: 1979.<br>
src := Socket newUDP setPort: 2345.<br>
buff := ByteArray new: 1026.<br>
delay := Delay forMilliseconds: 10.<br>
localhost := ByteArray withAll: { 192. 168. 42. 11 }.<br>
received := nil.<br>
<br>
rp := [[ received := dst receiveUDPDataInto: buff.<br>
 received first  isZero ] whileTrue: [ delay wait ].<br>
 WorldState addDeferredUIMessage: [ { buff. received } inspect ]] fork.<br>
<br>
src sendUDPData: ( &#39;ctmame&#39; , (String value: 10) , (String value: 162)) toHost: localhost port:  1979.<br>
<br>
rp terminate.<br>
src closeAndDestroy.<br>
dst closeAndDestroy.<br>
<br>
src := nil.<br>
dst := nil.<br>
buff := nil.<br>
delay := nil.<br>
rp := nil.<br>
<br>
Smalltalk garbageCollect<br>
Socket allInstances&gt;&gt;<br><br>That&#39;s great, thank you very much.  I have a couple of other questions that sprang from using this code.<br>1. I couldn&#39;t get the WorldState addDeferredUIMessage: to do anything.  What is supposed to happen?  I am running the latest Pharo build. The class exists, and I didn&#39;t get a DNU, but I didn&#39;t get anything else either!<br>
<br>2. Out of curiosity, I tried used the NetNameResolver addressForName: method as a way of getting a socket address  (instead of using the ByteArray.  I tried this when nothing was working, and I noticed the method call in several of the Socket methods.  However, Squeak gave me a DNU.  Is there a simple way to enter host names using the NetNameResolver, or have I completely misunderstood its function?<br>
<br>Cheers<br>Andy<br>