> Hi, I'm trying to implement a simple server. What I want the code to do
> is as follows:
>
> * Create a socket and listen on a port
> * Wait for an incoming connection
> * When a connection is received, fork a process to deal with it and go
> back to waiting for connections.
>
> I believe the following code should accomplish this (I have omitted the
> loop and the fork because I want to get it working for a single
> connection before I start with multiple connections!):
>
> server := Socket new.
> server listenOn: 1234.
> client := server accept.
>
> However when I run this I get Socket(Object)>>primitiveFailed. Examining the stack trace reveals the source to be this method:
>
> Socket>>primAcceptFrom:receiveBufferSize:sendBufSize:semaIndex:
> <primitive: 'primitiveSocketAccept' module: 'SocketPlugin'>
> ^self primitiveFailed
>
> When I take a look in /usr/local/lib/squeak/3.11.3-2135 there are lots of plugins, but no SocketPlugin. Swazoo seems to work fine without it and all of the tests in the NetworkTests package pass.
>
> _______________________________________________
> Pharo-users mailing list
>
[hidden email]
>
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users>