chrisnc/tangaroa

About using Tangaroa

Closed this issue · 1 comments

I am Hatem Salama, i am going to get my degree in using consensus in securing MANET network using my simulator.

I installed Tangaroa on windows 7 64-bit and it is working very well, but when calling the bftraft client it gets the command from the stdIn using "cmd <- getLine" in infinite loop as follows (Client.hs):

getCommand :: IO CommandType
getCommand = do
cmd <- getLine
case words cmd of
["insert", k, v] -> return (Insert k v)
["delete", k] -> return (Delete k)
["set", k, v] -> return (Set k v)
["get", k] -> return (Get k)
_ -> do

But really i need to run client using as taking the different commands from ready created text file which is output of simulator, so that each line contains well defined command of the 4 commands (insert - delete - set - get) and i need to get the output recorded in another text file

Note : I am not powerful in Haskell but i need this modification for my simulator.

This seems like a basic Haskell question, and the issue tracker of this repo is not the correct place for it. You have opened invalid issues on this repo before, so please don't continue. There are places around the internet where you can ask for Haskell help. You can learn about the basics of I/O in Haskell here: http://learnyouahaskell.com/input-and-output or google something like "haskell read from file"