18 Jul 22:58
advice on efficient socket programming sought
From: Philippe Marschall <philippe.marschall <at> gmail.com>
Subject: advice on efficient socket programming sought
Newsgroups: gmane.comp.lang.smalltalk.squeak.general
Date: 2008-07-18 20:59:51 GMT
Subject: advice on efficient socket programming sought
Newsgroups: gmane.comp.lang.smalltalk.squeak.general
Date: 2008-07-18 20:59:51 GMT
Hi list Are there some guidelines available on doing efficient socket programming with Squeak for something like a server? My read pattern will be: - read one to four bytes - read a chunk of up to 8k bytes, the number of bytes is encoded in the bytes read before, these chunks can be either binary or text, again this depends on the bytes read above - repeat My write pattern will be similar. It could be made into bulk writes of up to 8k. Does it make sense to use Socket or is it too much hassle and I should use SocketStream? If I should go for SocketStream is constantly flipping between #binary and #ascii a bad idea? If is it preferable to run #ascii and convert the integer protocol constants to Characters or run #binary and send #asString to the resulting ByteArray? Cheers Philippe
RSS Feed