<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
                                        Hi Herbert --<div><br></div><div>Thanks for the tip.</div><div><br></div><div>The example I provided should rather serve as a starting point to have a look at the proper classes and methods. It's details should not be treated as best practice. There can be other values or messages better suited for the job. It is advisable to use the Senders/Implementors tools to locate more examples in the environment.</div><div><br></div><div>Best,</div><div>Marcel</div><div class="mb_sig"></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 15:12:49 schrieb Herbert König <herbertkoenig@gmx.net>:</p><div style="font-family:Arial,Helvetica,sans-serif">
    Hi Marcel,<br>
    <br>
    to my best knowledge the first 32K of 64K possible ports are
    occupied.
    <a class="moz-txt-link-freetext" href="https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers">https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers</a><br>
    So if you randomly choose one of them, you might get conflicts with
    a service running on your computer on that port.<br>
    <br>
    I always use port numbers at the upper end of the range. <br>
    <br>
    Looking at the above page port 1234 is assigned by IANA to the
    infoseek search agent and unofficially used by the VNC client. <br>
    <br>
    Cheers,<br>
    <br>
    Herbert<br>
    <br>
    <div class="moz-cite-prefix">Am 15.10.2021 um 14:19 schrieb Marcel
      Taeumel:<br>
    </div>
    <blockquote type="cite" cite="mid:Mailbird-b8ab2257-cb92-475c-9c80-92e3fa631d34@hpi.de" style="min-width: 500px">
      
      <div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr"> Hi Timothy --
        <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 <a class="moz-txt-link-rfc2396E" href="mailto:gettimothy@zoho.com"><gettimothy@zoho.com></a>:</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 <a class="moz-txt-link-rfc2396E" href="mailto:marcel.taeumel@hpi.de"><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" moz-do-not-send="true">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>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap=""></pre>
    </blockquote>
    <br>
  </div></blockquote></div>