Set up a connection
telnet enfield.sics.se 2000
telnet localhost 2000
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
{'ubf1.0',"meta_server","
see http://www.sics.se/~joe/ubf/ for details of this service
type 'info'$ for information
"}$
Ask for information
'info'$
{"I am a meta server -
type 'help'$
to find out what I can do",'start'}$
Ask for a list of servers
'services'$
{#"test_server"&"irc_server"&"file_server"&,'start'}$
Activate a service
{'startService',"file_server",#}$
{{'ok',"I am a mini file server"},'start'}$
Ask for information - note this
has now changed since we are now talking to a different service
'info'$
{"I am a mini file server",'start'}$
Ask for the long description - note this
has now changed since we are now talking to a different service
'description'$
{"
Commands:
'ls'$ List files
{'get' File} => Length ~ ... ~ | noSuchFile
",'start'}$
Do a list command
'ls'$
{{'files',#"ubf.erl"&"client.erl"&"Makefile"& ...
Fetch a file
{'get',"Makefile"}$
{1274~ ... ~'start'}$
Fetch the contract - this is the UBF(A) parse tree
of the UBF(B) contract given above :-)
{'contract'$
{'contract',
{{'name',"file_server"},
{'info',"I am a mini file server"},
{'description',"
Commands:
'ls'$ List files
{'get' File} => Length ~ ... ~ | noSuchFile
"},
{'services',#},
{'states',
#{'start',
#{'input',{'tuple',#{'prim','file'}&{'constant','get'}&},
#{'output',{'constant','noSuchFile'},'stop'}&
{'output',{'prim','binary'},'start'}&}&
{'input',{'constant','ls'},
#{'output',
{'tuple',
#{'list',{'prim','string'}}&
{'constant','files'}&},'start'}&}&}&},
{'types',
#{'file',{'prim','string'}}&}}}$
|