diff --git a/cmd/server.go b/cmd/server.go index 72da336..823b414 100644 --- a/cmd/server.go +++ b/cmd/server.go @@ -90,25 +90,11 @@ func masterReceiver(slaveChannel chan<- string, masterChannel <-chan string) { } } -// func receiver(conn net.Conn, ch chan string) { -// fmt.Println("THE RECEIVER HAS BEEN STARTED, YOU CAN ONLY SEE THIS MESSAGE ONCE") -// receiverIsStarted = false -// for { -// select { -// case otherMessage := <-ch: -// conn.Write([]byte(otherMessage)) -// default: -// } -// } -// } - func handleConn(conn net.Conn, slaveChannel <-chan string, masterChannel chan<- string) { defer conn.Close() - //var otherMessage string go func() { for { - //select { message := <-slaveChannel conn.Write([]byte(message)) }