diff options
author | Henrik Nord <[email protected]> | 2011-09-06 15:27:22 +0200 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2011-09-06 15:29:35 +0200 |
commit | 684f1b321c8c4d07edee23737e178976af051913 (patch) | |
tree | 320f69cbd3cf279dfaf30a86e6b4099ba57549c0 /lib/observer/test/client.erl | |
parent | e7af9a6004cc13f1c49c4b6304adc9b8cd859cba (diff) | |
parent | 7e2c8763c225dc16f98cc5746fa141b970a6aaf3 (diff) | |
download | otp-684f1b321c8c4d07edee23737e178976af051913.tar.gz otp-684f1b321c8c4d07edee23737e178976af051913.tar.bz2 otp-684f1b321c8c4d07edee23737e178976af051913.zip |
Merge branch 'pd/ttb-cleanup' into major
OTP-9430
OTP-9403
OTP-9431
Diffstat (limited to 'lib/observer/test/client.erl')
-rw-r--r-- | lib/observer/test/client.erl | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/observer/test/client.erl b/lib/observer/test/client.erl new file mode 100644 index 0000000000..e756f9d6e8 --- /dev/null +++ b/lib/observer/test/client.erl @@ -0,0 +1,28 @@ +-module(client). +-compile(export_all). + +init(Node) -> + application:start(runtime_tools), + net_kernel:connect_node(Node). + +init() -> + init(server_node()). + +restart() -> + init:restart(). + +server_node() -> + {ok,HostName} = inet:gethostname(), + list_to_atom("server@" ++ HostName). + +get() -> + erlang:send({server,server_node()}, {get,self()}), + receive Data -> Data + after 1000 -> no_reply + end. + +put(Thing) -> + erlang:send({server,server_node()}, {put,self(),Thing}), + receive ok -> ok + after 1000 -> no_reply + end. |