<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt;"><div>Thank you.<br></div><div><br></div><div>I was able to make the last example here: <a target="_blank" href="http://wiki.squeak.org/squeak/325">http://wiki.squeak.org/squeak/325</a>  work.<br></div><div><br></div><div>For some reason, using UDP throws an error, I do not know why, and of course, I will waste time trying to figure out why.<br></div><div><br></div><div>I will give your  example a go next!<br></div><div><br></div><div>Then, I will try the pharo->squeak send.<br></div><div><br></div><div>this is fun!<br></div><div><br></div><div>Thank you.</div><div><br></div><div class="zmail_extra_hr" style="border-top: 1px solid rgb(204, 204, 204); height: 0px; margin-top: 10px; margin-bottom: 10px; line-height: 0px;"><br></div><div class="zmail_extra" data-zbluepencil-ignore="true"><br><div id="Zm-_Id_-Sgn1">---- On Fri, 15 Oct 2021 08:19:35 -0400 <b>Marcel Taeumel <marcel.taeumel@hpi.de></b> wrote ----<br></div><br><blockquote style="margin: 0px;"><div><div id="x_-2016685357__MailbirdStyleContent" style="font-size :  10pt; font-family :  Arial; color :  #000000; text-align :  left;" dir="ltr">Hi Timothy --<div class="x_-2016685357mb_sig"><br></div><div><br></div><div>Sockets work something like this (even though network name resolving seems to be tricky on my Windows machine at the moment):<br></div><div><br></div><div><div><span class="size" style="font-size:13.3333px">| hostName port serverSocket serverProcess clientSocket |</span><br></div><div><span class="size" style="font-size:13.3333px"><br></span></div><div><span class="size" style="font-size:13.3333px">hostName := NetNameResolver localHostName.</span><br></div><div><span class="size" style="font-size:13.3333px">port := 1234.</span><br></div><div><span class="size" style="font-size:13.3333px">data := 'Hello World!'.</span><br></div><div><span class="size" style="font-size:13.3333px"><br></span></div><div><span class="size" style="font-size:13.3333px">serverSocket := Socket newTCP.</span><br></div><div><span class="size" style="font-size:13.3333px">serverSocket listenOn: port.</span><br></div><div><span class="size" style="font-size:13.3333px"><br></span></div><div><span class="size" style="font-size:13.3333px">serverProcess := [</span><br></div><div><span class="size" style="font-size:13.3333px"><span style="white-space :  pre;"></span>| receivedData |</span><br></div><div><span class="size" style="font-size:13.3333px"><span style="white-space :  pre;"></span>serverSocket waitForConnectionFor: 10 "seconds".</span><br></div><div><span class="size" style="font-size:13.3333px"><span style="white-space :  pre;"></span>Transcript showln: 'Server accepted client connection'.<span style="white-space :  pre;"></span></span><br></div><div><span class="size" style="font-size:13.3333px"><span style="white-space :  pre;"></span>receivedData := serverSocket receiveData.</span><br></div><div><span class="size" style="font-size:13.3333px"><span style="white-space :  pre;"></span>Transcript showln: 'Data received: ', receivedData.</span><br></div><div><span class="size" style="font-size:13.3333px"><span style="white-space :  pre;"></span>serverSocket closeAndDestroy.</span><br></div><div><span class="size" style="font-size:13.3333px">] newProcess.</span><br></div><div><span class="size" style="font-size:13.3333px">serverProcess priority: Processor userBackgroundPriority.</span><br></div><div><span class="size" style="font-size:13.3333px">serverProcess resume. "or use #forkAt: directly on block"</span><br></div><div><span class="size" style="font-size:13.3333px"><br></span></div><div><span class="size" style="font-size:13.3333px">clientSocket := Socket newTCP.</span><br></div><div><span class="size" style="font-size:13.3333px">clientSocket</span><br></div><div><span class="size" style="font-size:13.3333px"><span style="white-space :  pre;"></span>connectTo: (NetNameResolver addressFromString: hostName)</span><br></div><div><span class="size" style="font-size:13.3333px"><span style="white-space :  pre;"></span>port: port.</span><br></div><div><span class="size" style="font-size:13.3333px">Transcript showln: 'Client connected to server'.</span><br></div><div><span class="size" style="font-size:13.3333px"><br></span></div><div><span class="size" style="font-size:13.3333px">Transcript showln: 'Data sent: ', (clientSocket sendData: data), ' bytes'.</span><br></div><div><span class="size" style="font-size:13.3333px">clientSocket closeAndDestroy.</span><br></div></div><div><span class="size" style="font-size:13.3333px"><br></span></div><div><span class="size" style="font-size:13.3333px">Best,</span><br></div><div><span class="size" style="font-size:13.3333px">Marcel</span><br></div><blockquote class="x_-2016685357history_container" style="border-left-style :  solid; border-width :  1px; margin-top :  20px; margin-left :  0px; padding-left :  10px; min-width :  500px;"><p style="margin-top: 10px;"><span class="colour" style="color: rgb(170, 170, 170); margin-top: 10px;">Am 15.10.2021 13:34:07 schrieb gettimothy <<a href="mailto:gettimothy@zoho.com" target="_blank">gettimothy@zoho.com</a>>:</span><br></p><div style="font-family :  Arial, Helvetica, sans-serif;"><div style="font-family :  Verdana,  Arial,  Helvetica,  sans-serif; font-size :  10pt;"><div><br></div><div>Marcel,<br></div><div><br></div><div>Thank you.<br></div><div><br></div><div>I have not found any information on sockets in SBE or PBE.  I will continue too look.<br></div><div><br></div><div>In my exploring, I thought JSON looked promising..pharo as a json server thingy that perhaps squeak could consume.<br></div><div>IIRC Stomp, which I have used previously on squeak has two side too, but I am not sure on this.<br></div><div><br></div><div>cheers,<br></div><div><br></div><div>t<br></div><div><br></div><div class="x_-2016685357zmail_extra_hr" style="border-top :  1px solid rgb(204, 204, 204); min-height:  0px; margin-top :  10px; margin-bottom :  10px; line-height :  0px;"><br></div><div class="x_-2016685357zmail_extra"><br><div id="x_-2016685357Zm-_Id_-Sgn1">---- On Fri, 15 Oct 2021 04:16:35 -0400 <b>Marcel Taeumel <<a href="mailto:marcel.taeumel@hpi.de" target="_blank">marcel.taeumel@hpi.de</a>></b> wrote ----<br></div><br><blockquote style="margin :  0px; min-width :  500px;"><div><div id="x_-27494605__MailbirdStyleContent" style="font-size :  10pt; font-family :  Arial; color :  #000000; text-align :  left;" dir="ltr">Hi Timothy --<div class="x_-27494605mb_sig"><br></div><div><br></div><div>If it is just a text stream, use sockets. If it is a data/byte stream ... well ... I am not sure whether the byte interpretation for structured objects is still compatible between Pharo and Squeak.<br></div><div><br></div><div>Maybe you could also use a file and two file streams, a writer in Pharo and a reader in Squeak, as intermediary ...<br></div><div><br></div><div>Best,<br></div><div>Marcel<br></div><blockquote class="x_-27494605history_container" style="border-left-style :  solid; border-width :  1px; margin-top :  20px; margin-left :  0px; padding-left :  10px; min-width :  500px;"><p style="margin-top :  10px;"><span class="colour" style="color: rgb(170, 170, 170); margin-top: 10px;">Am 14.10.2021 15:24:23 schrieb gettimothy via Squeak-dev <<a href="mailto:squeak-dev@lists.squeakfoundation.org" target="_blank">squeak-dev@lists.squeakfoundation.org</a>>:</span><br></p><div style="font-family  :  Arial,  Helvetica,  sans-serif;"><div style="font-family :  Verdana,   Arial,   Helvetica,   sans-serif; font-size :  10pt;"><div>Hi Folks,<br></div><div><br></div><div><br></div><div>I have used ApacheMQ(?) and Stomp in squeak to communicate between squeak and a C++ application, it worked well, but I would like to avoid this for my project.<br></div><div><br></div><div><br></div><div>What I (will) have is a pharo image that will parse a large XML document for me (squeak has FileSystem incompatabilities that SAXHandler etc need)  .<br></div><div><br></div><div>During a SAXHandler callback, I want to kick this to an image that will parse some data using a PEG grammar I wrote and that needs some automated testing to perfect.<br></div><div><br></div><div>Communication  I would like is  pharo (sax) -> squeak(xtreams-parsing).<br></div><div><br></div><div>Some basic reading showed rST from about 2005? as a possibility as well as Nebraska,which I believe has been removed from Squeak several releases ago.<br></div><div>I have used neither of them.<br></div><div><br></div><div>If there is not a method I can make work, then I will do pharo(sax/stomp)->ApacheMQ->squeak(stomp/xtreams-parsing), but I prefer a pure smalltalk mechanism.<br></div><div><br></div><div><br></div><div><br></div><div>I still have a textbook of mpq(?) queues from a course I really enjoyed and pharo(sax)->squeak(queueing)->squeak(xtreams-parsing) would be really cool.<br></div><div><br></div><div>thx in advance.<br></div><div><br></div></div><br></div></blockquote></div><br></div></blockquote></div><div><br></div></div><br></div></blockquote></div><br></div></blockquote></div><div><br></div></div><br></body></html>