[Pharo-project] Networking problems on Pharo 1.2.1

Oscar E A Callau oalvarez at dcc.uchile.cl
Thu Apr 21 05:20:31 CEST 2011

Hi all, may be this is a simple/stupid/repetitive question, but I don't know how to solve it. 

I'm trying to connect two sockets on Pharo 1.2.1, with following code:


	|port msg|
	port:= 9191.
	Transcript open; show: 'testing --- ' ; cr.
	listening := true.
	[self isListening] whileTrue: [
		|server connectedClient|
		server := Socket newTCP.
		server listenOn: port.
		connectedClient := server waitForAcceptFor: 5.
		connectedClient ifNil: [msg:='TimeOut'] ifNotNil:[
			msg := 'Data: ', connectedClient receiveData
			connectedClient closeAndDestroy ].     
		Transcript show: msg ; cr. 		
		server closeAndDestroy.		

	Transcript show: 'end ------'.


| s |
s:= Socket newTCP.
s connectToHostNamed: 'localhost' port: 9191.
s sendData: 'Hello'.
s closeAndDestroy 


First I run the server and later the client and get the following error:

Error: primAcceptFrom:receiveBufferSize:sendBufSize:semaIndex: failed

I attach a screenshot of the debug window.

Thanks in advance.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen shot 2011-04-20 at 23.16.48 .png
Type: image/png
Size: 68307 bytes
Desc: not available
URL: <http://lists.gforge.inria.fr/pipermail/pharo-project/attachments/20110420/97011cda/attachment.png>

More information about the Pharo-project mailing list