summaryrefslogtreecommitdiff
path: root/docs/examples/actors/counter/CounterUserTcp.scala
diff options
context:
space:
mode:
Diffstat (limited to 'docs/examples/actors/counter/CounterUserTcp.scala')
-rw-r--r--docs/examples/actors/counter/CounterUserTcp.scala38
1 files changed, 0 insertions, 38 deletions
diff --git a/docs/examples/actors/counter/CounterUserTcp.scala b/docs/examples/actors/counter/CounterUserTcp.scala
deleted file mode 100644
index b6c304bb1c..0000000000
--- a/docs/examples/actors/counter/CounterUserTcp.scala
+++ /dev/null
@@ -1,38 +0,0 @@
-package actors.examples.counter
-
-import actors.multi.Pid
-import actors.distributed.RemoteActor
-import actors.distributed.TCP
-import actors.distributed.TcpNode
-import actors.distributed.TcpService
-
-class CounterUser extends RemoteActor {
- override def run(): unit = {
- alive(TCP())
-
- spawn(TcpNode("127.0.0.1", 9090), "actors.examples.counter.Counter")
-
- receive {
- case p: Pid =>
- // communicate with counter
- Console.println("" + node + ": Sending Incr() to remote Counter (" + p + ")...")
- p ! Incr()
- p ! Incr()
- p ! Value(self)
- receive {
- case Result(v) =>
- Console.println("Received result: " + v)
- }
- }
- }
-}
-
-object Main {
- def main(args: Array[String]): unit = {
- val serv = new TcpService(9090)
- serv.start()
-
- val cu = new CounterUser
- cu.start()
- }
-}