mirror of
https://github.com/xvzc/SpoofDPI.git
synced 2024-12-23 06:42:51 +00:00
19 lines
243 B
Go
19 lines
243 B
Go
package net
|
|
|
|
import (
|
|
"net"
|
|
)
|
|
|
|
type Listener struct {
|
|
listener *net.TCPListener
|
|
}
|
|
|
|
func (l *Listener) Accept() (*Conn, error) {
|
|
conn, err := l.listener.AcceptTCP()
|
|
if err != nil {
|
|
return &Conn{}, err
|
|
}
|
|
|
|
return &Conn{conn: conn}, nil
|
|
}
|