ProcExporter

Constructor

ProcExporter <id> (Process subtree_to_export, int port)

Action

Makes a subtree of components available over the network. Any child of this subtree is reachable as if it were a local node through a RemoteProc component.

Predefined children

None

Cookbook recipe

directory:
smala/cookbook/comms/server

run :
make server_test

Example




use core
use base
use display
use gui
use comms

_main_
Component root {
  Frame f ("ProcExporter - server", 500, 100, 200, 200)
  Exit ex (0, 1)
  f.close -> ex
  FillColor _ (#101010)
  NoOutline _
  Rectangle bkg (0, 0, 0, 0, 0, 0)
  f.{width, height} =:> bkg.{width, height}
  ProcExporter pe (root, 8080)
  
  Incr inc (1)
  FillColor _ (White)
  Text t (80, 100, "")
  inc.state =:> t.text

  FillOpacity _ (0.5)
  FillColor _ (200, 100, 100)
  Circle c (50, 50, 20)
}