Ma Client Server missing methods

Michaël Piel piel at ensm-douai.fr
Wed Aug 24 17:24:36 UTC 2005


On Tue, 23 Aug 2005 09:59:21 -0700 (PDT)
Chris Muller <chris at funkyobjects.org> wrote:

> Hello,
> 
> > Does anyone use Ma Client Server ?
> 
> Yes, I use it extensively.
> 
> > I tried the last versions available on squeaksource (the last is Ma client
> > server-cmm.96) on the examples given at
> > http://minnow.cc.gatech.edu/squeak/2978 but some methods are missing (for
> > example MaServerSocket>>listenOn:answer:,  MaServer>>processRequestByteArray:
> > or MaObjectSerializer>>classDefinitions:).
> 
> Thanks for your report.  The latest version was only posted to SqueakMap, but I
> have just now posted it to SqueakSource as well.

Ok I've installed it without problems (except the complaining about "Ma object serialization-cmm.115.mcz" which I found via Monticello on Squeaksource).

> 
> > How can I do to make a simple client-server test ?
> 
> The version on SqueakMap includes a simple demonstration using the ByteArray
> layer.  Install the one from SqueakMap and then find the files "clientTest.ws"
> and "serverTest.ws".  Inspect serverTest first, then go to the client image,
> open a Transcript then run the script.

Ok it works, as well as the simple test that is on the wiki page (or in MaClientServerPackageInfo>>readmeText).

> 
> 1) MaServerSocket>>listenOn:answer:
> I have no idea what happened to this method, but I have put it back.
> 
> 2) MaServer>>processRequestByteArray:
> This is not missing, it just shouldn't be used as the do-nothing server stub. 
> I have corrected MaServerSocket>>#initialize.  Normally, your server will be
> doing something so you shouldn't need this method.
> 
> 3) MaObjectSerializer>>classDefinitions:
> This is a Magma method, you should not need it for Ma client server.  Is there
> some reason you need it for Ma client server?

I don't need it specifically. But I want to use the Object Request Layer and the connect method of MaTcpRequestServerLink do "serializer classDefinitionsByteArray: (idAndProtocol at: 2)" which performs "self classDefinitions: (self materializeGraph: aByteArray)".

Here is the code I used:
server side:
myServer := MaTcpRequestServer protocol:
	{ OrderedCollection.
	Dictionary. }.
myServer
	processOn: 12345
	using: [ :requestByteArray | requestByteArray reverse ]

client side:
myLinkToServer := MaTcpRequestServerLink 
	hostAddress: #(127 0 0 1) asByteArray 
	port: 12345.
myLinkToServer connect.
self submit: 'Hello!'

After several tests (and by taking your "serverTest.ws" as starting point) I've found that adding "myServer console: MaTranscriptConsole new." in the server resolved the problem. But I'm wondering why it fails with the default console (MaRequestServerConsole).


> 
> Let me know if you have any questions.
> 
>  - Chris
> 



More information about the Squeak-dev mailing list