mirror of
https://github.com/ehang-io/nps.git
synced 2025-07-02 04:00:42 +00:00
25 lines
374 B
Go
25 lines
374 B
Go
package handler
|
|
|
|
import (
|
|
"ehang.io/nps/lib/enet"
|
|
)
|
|
|
|
type RdpHandler struct {
|
|
DefaultHandler
|
|
}
|
|
|
|
func (rh *RdpHandler) GetName() string {
|
|
return "rdp"
|
|
}
|
|
|
|
func (rh *RdpHandler) GetZhName() string {
|
|
return "rdp协议"
|
|
}
|
|
|
|
func (rh *RdpHandler) HandleConn(b []byte, c enet.Conn) (bool, error) {
|
|
if b[0] == 3 && b[1] == 0 {
|
|
return rh.processConn(c)
|
|
}
|
|
return false, nil
|
|
}
|