Squeak SmalltalkJoker Squeak Smalltalk : Network : prevnext Socket Listen On

You're running into a legacy trap. Years back, when the socket 
primitives were invented the meaning of #listenOn: was to 'accept a 
single connection inplace'. 

Here's an example:

| server client |
server := Socket newTCP.
server listenOn: 12345.
client := Socket newTCP.
client connectTo: NetNameResolver localHostAddress port: 12345.
client waitForConnectionUntil: (Socket deadlineSecs: 1).

Once the client has established the connection, the server is already 
bound so trying to 'accept' anything from it is not going to work 
(that's the primitive failure you see). The message you want to use is
#listenOn:backlogSize: e.g.,

| listener client accepted |
listener := Socket newTCP.
listener listenOn: 12345 backlogSize: 4.
client := Socket newTCP.
client connectTo: NetNameResolver localHostAddress port: 12345.
client waitForConnectionUntil: (Socket deadlineSecs: 1).
accepted := listener waitForAcceptUntil: (Socket deadlineSecs: 1).