I was sending some data using *ipconn.Write method in go , but it seems *ipconn.Read() can only read 20 bytes at a time
here is server sending data
ln, err := net.Listen("tcp", "localhost:8888")
conn, err := ln.Accept()
tmp := make([]byte,10000)
tmp = []byte("abcdefghijklmnopqrstuvwxyz")
conn.Write(tmp)
here is the client receiving data
conn, err := net.Dial("tcp", "localhost:8888")
data := make([]byte, 100000)
conn.Read(data)
fmt.Println(string(data)) // prints only first 20 chars
If i again call conn.Read(data) I get another 20 characters
Is there any way to read all the data or loop until the connection is closed ?