修正linux系统编译问题

This commit is contained in:
lwch
2021-10-22 11:49:47 +08:00
parent b969949d85
commit 45a407e60c
4 changed files with 23 additions and 12 deletions
+8
View File
@@ -19,6 +19,14 @@ const (
listenEnd = 6955
)
// Process process
type Process struct {
pid int
srv *http.Server
chWrite chan *Msg
chImage chan *ImageData
}
func (p *Process) listenAndServe() (uint16, error) {
mux := http.NewServeMux()
mux.HandleFunc("/", p.ws)
@@ -5,7 +5,6 @@ import (
"fmt"
"image"
"natpass/code/client/tunnel/vnc/core/define"
"net/http"
"os"
"strings"
"syscall"
@@ -16,14 +15,6 @@ import (
"golang.org/x/sys/windows"
)
// Process process
type Process struct {
pid int
srv *http.Server
chWrite chan *Msg
chImage chan *ImageData
}
func getLogonPid(sessionID uintptr) uint32 {
snapshot, err := syscall.CreateToolhelp32Snapshot(syscall.TH32CS_SNAPPROCESS, 0)
if err != nil {
+8 -3
View File
@@ -2,9 +2,10 @@
package core
// Process process
type Process struct {
}
import (
"image"
"time"
)
// CreateWorkerProcess create worker process
func CreateWorkerProcess() (*Process, error) {
@@ -14,3 +15,7 @@ func CreateWorkerProcess() (*Process, error) {
// Close close process
func (p *Process) Close() {
}
func (p *Process) Capture(timeout time.Duration) (*image.RGBA, error) {
return nil, nil
}
+7
View File
@@ -1,3 +1,10 @@
// +build !windows
package core
type workerOsBased struct {
}
func (worker *Worker) init() error {
return nil
}