func (r *ReadWriter) Write(p []byte) (int, error) {
	var total int
	if r.sock.GetType() == Router {
		err := r.sock.SendFrame(r.GetLastClientID(), FlagMore)
		if err != nil {
			return total, err
		}
	}
	err := r.sock.SendFrame(p, 0)
	if err != nil {
		return total, err
	}

	return len(p), nil

}
// Write satisfies io.Write
Write satisfies io.Write
// Write satisfies io . Write
func (r *ReadWriter) Write(p []byte) (int, error) {
	var total int
	if r.sock.GetType() == Router {
		err := r.sock.SendFrame(r.GetLastClientID(), FlagMore)
		if err != nil {
			return total, err
		}
	}
	err := r.sock.SendFrame(p, 0)
	if err != nil {
		return total, err
	}
	return len(p), nil
}
func ( r * ReadWriter ) Write ( p [ ] byte ) ( int , error ) { var total int if r . sock . GetType ( ) == Router { err := r . sock . SendFrame ( r . GetLastClientID ( ) , FlagMore ) if err != nil { return total , err } } err := r . sock . SendFrame ( p , 0 ) if err != nil { return total , err } return len ( p ) , nil }
Write satisfies io.Write
Write satisfies io . Write