<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
                                        Hi Timothy --<div class="mb_sig"></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):</div><div><br></div><div><div><span style="font-size: 13.3333px">| hostName port serverSocket serverProcess clientSocket |</span></div><div><span style="font-size: 13.3333px"><br></span></div><div><span style="font-size: 13.3333px">hostName := NetNameResolver localHostName.</span></div><div><span style="font-size: 13.3333px">port := 1234.</span></div><div><span style="font-size: 13.3333px">data := 'Hello World!'.</span></div><div><span style="font-size: 13.3333px"><br></span></div><div><span style="font-size: 13.3333px">serverSocket := Socket newTCP.</span></div><div><span style="font-size: 13.3333px">serverSocket listenOn: port.</span></div><div><span style="font-size: 13.3333px"><br></span></div><div><span style="font-size: 13.3333px">serverProcess := [</span></div><div><span style="font-size: 13.3333px"><span style="white-space:pre">    </span>| receivedData |</span></div><div><span style="font-size: 13.3333px"><span style="white-space:pre">      </span>serverSocket waitForConnectionFor: 10 "seconds".</span></div><div><span style="font-size: 13.3333px"><span style="white-space:pre">    </span>Transcript showln: 'Server accepted client connection'.<span style="white-space:pre">      </span></span></div><div><span style="font-size: 13.3333px"><span style="white-space:pre">      </span>receivedData := serverSocket receiveData.</span></div><div><span style="font-size: 13.3333px"><span style="white-space:pre">     </span>Transcript showln: 'Data received: ', receivedData.</span></div><div><span style="font-size: 13.3333px"><span style="white-space:pre">   </span>serverSocket closeAndDestroy.</span></div><div><span style="font-size: 13.3333px">] newProcess.</span></div><div><span style="font-size: 13.3333px">serverProcess priority: Processor userBackgroundPriority.</span></div><div><span style="font-size: 13.3333px">serverProcess resume. "or use #forkAt: directly on block"</span></div><div><span style="font-size: 13.3333px"><br></span></div><div><span style="font-size: 13.3333px">clientSocket := Socket newTCP.</span></div><div><span style="font-size: 13.3333px">clientSocket</span></div><div><span style="font-size: 13.3333px"><span style="white-space:pre">  </span>connectTo: (NetNameResolver addressFromString: hostName)</span></div><div><span style="font-size: 13.3333px"><span style="white-space:pre">      </span>port: port.</span></div><div><span style="font-size: 13.3333px">Transcript showln: 'Client connected to server'.</span></div><div><span style="font-size: 13.3333px"><br></span></div><div><span style="font-size: 13.3333px">Transcript showln: 'Data sent: ', (clientSocket sendData: data), ' bytes'.</span></div><div><span style="font-size: 13.3333px">clientSocket closeAndDestroy.</span></div></div><div><span style="font-size: 13.3333px"><br></span></div><div><span style="font-size: 13.3333px">Best,</span></div><div><span style="font-size: 13.3333px">Marcel</span></div><blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
                        <p style="color: #AAAAAA; margin-top: 10px;">Am 15.10.2021 13:34:07 schrieb gettimothy <gettimothy@zoho.com>:</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</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 04:16:35 -0400 <b>Marcel Taeumel <marcel.taeumel@hpi.de></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>