add io.ReadWriteClose and use it in http
R=r
DELTA=15 (6 added, 7 deleted, 2 changed)
OCL=17447
CL=17461
diff --git a/src/lib/io.go b/src/lib/io.go
index 8ab751a..20b7b90 100644
--- a/src/lib/io.go
+++ b/src/lib/io.go
@@ -19,6 +19,12 @@
Write(p *[]byte) (n int, err *os.Error);
}
+export type ReadWriteClose interface {
+ Read(p *[]byte) (n int, err *os.Error);
+ Write(p *[]byte) (n int, err *os.Error);
+ Close() *os.Error;
+}
+
export func WriteString(w Write, s string) (n int, err *os.Error) {
b := new([]byte, len(s)+1);
if !syscall.StringToBytes(b, s) {