summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2010-12-26 19:54:40 +0000
committerChristian Pointner <equinox@spreadspace.org>2010-12-26 19:54:40 +0000
commit00e8809aed2a25ca495887b1fad239a90ffd2431 (patch)
treea337d974a69c9bbc929f142d872dbaafb26eee0d
parentupdated TODO (diff)
cleanup
git-svn-id: https://svn.spreadspace.org/gcsd/trunk@79 ac14a137-c7f1-4531-abe0-07747231d213
-rw-r--r--TODO2
-rw-r--r--examples/dynamic_dispatch_table.lua24
2 files changed, 12 insertions, 14 deletions
diff --git a/TODO b/TODO
index 2dfd0bc..82501a9 100644
--- a/TODO
+++ b/TODO
@@ -1,5 +1,3 @@
- * ignore response table when output is write only
- * no expected response at basic mode when output is write only
* send response to requestor
* out-of-order responses
* add listener tables (for requests, responses and other messages)
diff --git a/examples/dynamic_dispatch_table.lua b/examples/dynamic_dispatch_table.lua
index 4d94fa2..38b8bae 100644
--- a/examples/dynamic_dispatch_table.lua
+++ b/examples/dynamic_dispatch_table.lua
@@ -1,16 +1,16 @@
local get_length_table = {
- [".."] = function(match)
- local bytes = string.byte(match, 1, 2)
- local length = bytes[1] * 256^2 + bytes[2] -- TODO byte order?
- local get_binary_data_table = {
- [string.rep(".", length)] = function(match)
- command_queue:enqueue(match)
- dispatch_table:register_handler_table(get_length_table)
- end
- }
-
- dispatch_table:register_handler_table(get_binary_data_table)
- end
+ [".."] = function(match)
+ local bytes = string.byte(match, 1, 2)
+ local length = bytes[1] * 256^2 + bytes[2] -- TODO byte order?
+ local get_binary_data_table = {
+ [string.rep(".", length)] = function(match)
+ command_queue:enqueue(match)
+ dispatch_table:register_handler_table(get_length_table)
+ end
+ }
+
+ dispatch_table:register_handler_table(get_binary_data_table)
+ end
}
local responses = {