For a server writing files on a lot of concurrent connections, you may want to close the file before net.Conn:Write to avoid max open file error. The cycle is
b := make ([]byte, n) var err error for off:=0; err != io.Eof; off+=len { f, err := s.OpenFile(name) len, err := f.ReadAt(b, off) f.Close() Conn.Write() } I don't see an io package function to do this, should there be one? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.