How to read data (xml) sent by server if it doesn't send new line
问题 Let's say we try to communicate with a server (XMPP) which sends back XML data. We can use conn, err := net.Dial("tcp", s.Addr+":5222") //... r := bufio.NewReader(conn) //... s, err := s.R.ReadString(10) // to read a string But there is one problem that the server doesn't send the \10 (newline) symbol. I also tried 12 but without any luck. Same goes for readLine function as it also relies on \10. So how do I read the data sent by server? I tried using '>' as a delimiter and succeeded to