|author||Yorhel <firstname.lastname@example.org>||2012-04-10 16:59:32 +0200|
|committer||Yorhel <email@example.com>||2012-04-10 16:59:32 +0200|
Added simple design document + mention distclean in README
2 files changed, 98 insertions, 0 deletions
@@ -15,6 +15,8 @@ USAGE
Make sure you have Go 1 installed. Then you can just type 'make' to build
globster and 'make install' to install the thing if you wish.
+ If you get build errors after some upgrade, try a 'make distclean' followed
+ by 'make'. If that doesn't solve it then you've probably hit a bug.
diff --git a/design b/design
new file mode 100644
@@ -0,0 +1,96 @@
+ <action> <pattern>
+ < = registered for incoming pattern
+ > = outgoing tuples for notifications
+ (A session may send out more tuples, but those are to control itself or
+ another session, rather than providing a general notification).
+ Space separated list of elements.
+ * = wildcard
+ $var = variable
+ $var... = one or more fields
+ Anything else should be considered a literal.
+ < hub $name create
+ Creates a hub session with $name
+ < hub $name close
+ Closes the hub specified with $name, or all hubs if a wildcard is specified.
+ < hub $name exists
+ < hub $name connect $addr
+ < hub $name disconnect
+ < hub $name info
+ Replies with hub information
+ < userlist $name Changed "" $data
+ > hub $name Created
+ > hub $name Closed
+ > hub $name Connected $addr
+ > hub $name Disconnected $reason...
+ < userlist $hub get $id $field...
+ $id may be a wildcard to get a complete list
+ < userlist $hub getid $gid $field...
+ $gid may not be a wildcard here
+ < userlist $hub set $id $data
+ < userlist $hub del $id
+ $id may be a wildcard to clear all
+ < userlist $hub stats
+ Replies with user count and total share size
+ > userlist $hub Added $id $data
+ > userlist $hub Changed $id $old $new
+ > userlist $hub Deleted $id
+ $hub = $name of the corresponding Hub session
+ $id = This client: ""
+ ADC: SID (FourCC string)
+ NMDC: hex(raw_nick)
+ $gid = The GID field ("global ID")
+ $data = map with information on the user
+ $old, $new = $data, only containing the fields that changed
+ $field = refers to the keys in $data, not present = all
+ Fields (used in $data):
+ Name Username (UTF-8)
+ CID ADC: CID (base32 string), NMDC: Empty
+ TID Temp. ID = $id (read only)
+ GID Global ID. ADC: CID, NMDC: $id (read only)
+ Desc Description
+ EMail E-mail address
+ Client Client string (<appname> <space> <version>)
+ Upload Upload speed. ADC: int, bytes/s, NMDC: Some string
+ Download Download speed. ADC: int, bytes/s. NMDC: Empty
+ ShareSize int, number of bytes shared
+ ShareFiles int, number of files shared (ADC only)
+ KeyPrint KP field (ADC only)
+ IP4 IPv4 address
+ Slots int, number of opened slots
+ AutoSlots int, bytes/s, extra slot will be opened if total upload < AutoSlots
+ HubsOp int, number of hubs the user is OP on
+ HubsReg int, number of hubs the user is registered on
+ HubsNorm int, number of hubs the user is neither registered or OP on
+ // TODO: Active/passive + TLS support + ADC: I6, U4, U6, TO, AW