mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
server: changed interface definition and implementation
This commit is contained in:
1 parent
2813e80a98
commit
d37c2e2a35
14 files changed
+207
-240
No files matched your search
@@ -51,7 +51,7 @@ func NewTProxyServer(s string, dialer proxy.Dialer) (proxy.Server, error) {
|
||||
}
|
||||
|
||||
// ListenAndServe .
|
||||
func (s *TProxy) ListenAndServe(_ net.Conn) {
|
||||
func (s *TProxy) ListenAndServe() {
|
||||
// go s.ListenAndServeTCP()
|
||||
s.ListenAndServeUDP()
|
||||
}
|
||||
@@ -114,6 +114,9 @@ func (s *TProxy) ListenAndServeUDP() {
|
||||
|
||||
}
|
||||
|
||||
// Serve .
|
||||
func (s *TProxy) Serve(c net.Conn) {}
|
||||
|
||||
// ReadFromUDP reads a UDP packet from c, copying the payload into b.
|
||||
// It returns the number of bytes copied into b and the return address
|
||||
// that was on the packet.
|
||||
|
||||
Reference in new issue
Block a user