github.com/GeniusesGroup/libgo@v0.0.0-20220929090155-5ff932cb408e/tcp/stream-io.go (about) 1 /* For license and copyright information please see the LEGAL file in the code repository */ 2 3 package tcp 4 5 import ( 6 "io" 7 ) 8 9 /* 10 ********** protocol.Buffer interface ********** 11 */ 12 13 func (s *Socket) ReadFrom(reader io.Reader) (n int64, err error) { return } 14 func (s *Socket) WriteTo(w io.Writer) (totalWrite int64, err error) { 15 var writeLen int 16 writeLen, err = w.Write(s.recv.buf) 17 totalWrite = int64(writeLen) 18 return 19 }