code: func readMessage(conn *net.TCPConn, data *bytes.Buffer) (
  	length int, err error) {
  
  	if err = read(conn, 4, data); err != nil {
  		return
  	}
  
  	length = int(bytes2int(data.Next(4)))
  	if length == 0 {
  		return
  	}
  
  	if err = read(conn, length, data); err != nil {
  		return
  	}
  	return
  }
docs: // readMessage gets a message from the tcp connection.