func (t *traffic) ClientNewData(c lib.SSClienter, data []byte) (err error) { //do anything with data _, err = c.Remote().Write(data) if err != nil { log.Println(errors.New(err.Error())) c.Remote().Close() } return }
func (t *traffic) RemoteNewData(c lib.SSClienter, data []byte) (err error) { _, err = c.Write(data) if err != nil { if err != io.ErrClosedPipe { log.Println(errors.New(err.Error())) } c.Close() } return }
func (t *traffic) RemoteReadErr(c lib.SSClienter, err error) { c.Close() }