socket? I have my server which has a *json.Decoder variable and I need to send the content of this variable over net.Conn. I tried to convert it in byte and send it using c.Write([]byte(jsonvar)) but it didn't work
it has to work conn.Write([]byte(`{"msg":"Hello, I'm the net client"}`))
In this way It works but if i put the variable name It doesn't work
msgJson := `{"msg":"Hello, I'm the net client"}` conn.Write([]byte(msgJson))
Обсуждают сегодня