Beispiel #1
0
func sendTestData(conn gop2p.Conn) {
	ticker := time.Tick(3 * time.Second)
	for _ = range ticker {
		conn.SendData([]byte("Test"))
	}
}
Beispiel #2
0
func (handler *TestHandler) ReceivedData(conn gop2p.Conn, pack *gop2p.Package) {
	log.Printf("ReceivedData: %+v\r\n", *pack)
	if !pack.IsResponse {
		conn.ResponseSuccess(pack)
	}
}