Beispiel #1
0
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
}
Beispiel #2
0
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
}
Beispiel #3
0
func (t *traffic) RemoteReadErr(c lib.SSClienter, err error) {
	c.Close()
}