Skip to main content
Engineering LibreTexts

3.6: Chapter Summary

  • Page ID
    43804
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    This chapter introduces the use TCP sockets and socket streams to develop both network clients and servers. It has reviewed the survival kit of network programming:

    • Sockets are low-level bi-directional communication gateways instances of class Socket.
    • Socket-based programming always involves one server and one or more clients.
    • A server waits for requests emitted by clients.
    • Messages sendData: and receiveData are the socket primitives to send and receive data.
    • A maximum waiting time can be set using receiveDataTimeout:.
    • SocketStream is a buffered read-write stream that encapsulates a TCP socket.
    • Network DNS is accessible through the class NetNameResolver, which converts device names into numerical internet addresses.
    • Unix does provide some networking utilities that are useful for debugging and testing purposes.

    As mentioned in the introduction, we recommend using socket streams which are of a higher level and provide facility methods. They were successfully used in projects such as Swazoo and Kom web servers used respectively by AidaWeb and Seaside web frameworks.

    Nevertheless, socket streams remain still low-level if you have an application involving different objects distributed over communicating images. In a such software, developers need to deal with message passing between remote objects by serializing arguments and results. They will have also to take care of distributed garbage-collection. An object should not be destroyed if it is referenced by a remote one. These recurrent not trivial issues are solved by Object-Request Brokers (ORB) such as rST1. An ORB frees the developer from networking issues and thus allows expressing remote communications simply using messages exchanged between remote objects.


    1. http://smalltalkhub.com/#!/~CAR/rST/

    This page titled 3.6: Chapter Summary is shared under a CC BY-SA 3.0 license and was authored, remixed, and/or curated by Alexandre Bergel, Damien Cassou, Stéphane Ducasse, Jannik Laval (Square Bracket Associates) via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.