Skip to content

Commit

Permalink
clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
LoW0lf committed Jun 12, 2015
1 parent eb6bf13 commit a524063
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
20 changes: 11 additions & 9 deletions src/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,20 @@ module Main (
main
) where

import Types
import qualified Data.ByteString.Lazy as BL
import qualified Data.ByteString as BS
import qualified Data.ByteString.Char8 as C

import Control.Monad

import Data.IP
import Data.Word

import Kafka.Client

import Network.Socket

import System.IO
import Control.Monad
import Data.IP
import Data.Word
import qualified Data.ByteString.Lazy as BL
import qualified Data.ByteString as BS
import qualified Data.ByteString.Char8 as C

import qualified Network.Socket.ByteString.Lazy as SBL

Expand All @@ -38,7 +40,7 @@ main = do
-- Get Metadata from known broker
------------------
let mdReq = Metadata requestHeader [] -- request Metadata for all topics
sendRequest sock $ (pack mdReq)
sendRequest sock mdReq
mdInput <- SBL.recv sock 4096
let mdRes = decodeMdResponse mdInput
print "Brokers Metadata:"
Expand All @@ -61,7 +63,7 @@ main = do
putStrLn "Nachricht eingeben"
input <- getLine
let prReq = Produce requestHeader [ ToTopic t [ ToPart p [(stringToData input)]]]
sendRequest sock $ pack prReq
sendRequest sock $ prReq

--------------------
-- Receive Response
Expand Down
5 changes: 0 additions & 5 deletions src/Types.hs

This file was deleted.

0 comments on commit a524063

Please sign in to comment.