I'm a bit confused in how to do a client to send a string to a server, both in Go. When the server run ioutil.ReadAll(conexao) everything stop.
Server
conexao, _ := listener.Accept()
fmt.Printf("Conexão aceita %s
", conexao.RemoteAddr())
frase, _ := ioutil.ReadAll(conexao)
fmt.Println("Frase recebida")
convertida := strings.ToUpper(string(frase))
conexao.Write([]byte(convertida))
conexao.Close()
Client
conexao, _ := net.DialTCP("tcp", nil, enderecoTCPServidor)
fmt.Println("Conexão Estabelecida")
conexao.Write([]byte("Gato de Botas!"))
fmt.Println("Frase enviada")
maiuscula, _ := ioutil.ReadAll(conexao)
fmt.Println("Maiuscula ",string(maiuscula))