mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2025-10-22 08:19:24 +08:00
Refactor(core): with error callback
This commit is contained in:
@@ -1,14 +1,8 @@
|
||||
package adapter
|
||||
|
||||
// TransportHandler is a TCP/UDP connection handler that implements
|
||||
// HandleTCPConn and HandleUDPConn methods.
|
||||
// HandleTCP and HandleUDP methods.
|
||||
type TransportHandler interface {
|
||||
HandleTCP(TCPConn)
|
||||
HandleUDP(UDPConn)
|
||||
}
|
||||
|
||||
// TCPHandleFunc handles incoming TCP connection.
|
||||
type TCPHandleFunc func(TCPConn)
|
||||
|
||||
// UDPHandleFunc handles incoming UDP connection.
|
||||
type UDPHandleFunc func(UDPConn)
|
||||
|
Reference in New Issue
Block a user