/
client.go
47 lines (33 loc) · 1.03 KB
/
client.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package pi
import (
"context"
"github.com/hedzr/go-socketlib/tcp/base"
"github.com/hedzr/go-socketlib/tcp/protocol"
"github.com/hedzr/log"
)
func NewDNSClientInterceptor() protocol.ClientInterceptor {
return &dnsClient{}
}
type dnsClient struct {
}
func (s *dnsClient) OnConnected(ctx context.Context, c base.Conn) {
//panic("implement me")
}
func (s *dnsClient) OnClosing(c base.Conn, reason int) {
}
func (s *dnsClient) OnClosed(c base.Conn, reason int) {
}
func (s *dnsClient) OnError(ctx context.Context, c base.Conn, err error) {
}
func (s *dnsClient) OnReading(ctx context.Context, c base.Conn, data []byte) (processed bool, err error) {
return
}
func (s *dnsClient) OnWriting(ctx context.Context, c base.Conn, data []byte) (processed bool, err error) {
return
}
func (s *dnsClient) OnUDPReading(ctx context.Context, c log.Logger, packet *base.UdpPacket) (processed bool, err error) {
return
}
func (s *dnsClient) OnUDPWriting(ctx context.Context, c log.Logger, packet *base.UdpPacket) (processed bool, err error) {
return
}