Skip to content

Commit

Permalink
Minor changes in the server
Browse files Browse the repository at this point in the history
  • Loading branch information
estintax committed Aug 29, 2018
1 parent f360403 commit 995641d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions socket.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func StartServer(addr string) {
}

func ConnectionHandler(conn net.Conn) {
conn.Write([]byte("INFO: pinit services controller"))
conn.Write([]byte("INFO: pinit services controller\n"))
for {
var data string
bytes := make([]byte, 1024)
Expand All @@ -39,13 +39,13 @@ func ConnectionHandler(conn net.Conn) {
if len(params) > 1 {
proc := StartService(params[1], false)
if proc != nil {
conn.Write([]byte("START SUCCESS"))
conn.Write([]byte("START SUCCESS\n"))
} else {
conn.Write([]byte("START FAIL"))
conn.Write([]byte("START FAIL\n"))
}
}
case "PING":
conn.Write([]byte("PONG"))
conn.Write([]byte("PONG\n"))
}
}
}

0 comments on commit 995641d

Please sign in to comment.