On March 8th 2011, I gave a hands on talk on Pharo Networking. It was part of the Deep into Smalltalk sprint school organized by RMoD team from INRIA in Lille, France. You can find below slides are available on SlideShare. There is as well a 3 parts video from Youtube, although the audio is not so great.
Most of the content from the talk is still valid in the latest version of Pharo. But, I suggest to use the NetworkExtras project available on my PharoMisc GitHub repository. It provides facility classes for TCP and UDP as well as support for various kinds of UDP (unicast, multicast, broadcast) and other stuff regarding port management and large UDP datagrams.
Tip: Use Dedicated Processes
One thing to keep in mind is that socket commands you run from a Pharo Playground run in the main process. So, you need ensure that servers and clients that belong to the same image run in different processes.
To create a process in Pharo, just put your statements in a block and send the
forkAt: message. The argument is a process priority. Here is an example.
[ 10 timesRepeat: [ Transcript cr; show: 'Hello Pharo Networking' ] ] forkAt: Processor userBackgroundPriority