Attempt to clean up server codebase

This commit is contained in:
raul 2024-04-13 13:08:43 +02:00
parent 678244d289
commit 75dac0ccef
1 changed files with 0 additions and 14 deletions

View File

@ -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))
}