Files
umbrix-libcore/v2/example_server/main.go

19 lines
322 B
Go
Raw Normal View History

2024-03-10 19:45:03 +01:00
package main
import (
"os"
"os/signal"
"syscall"
2024-03-22 16:25:56 +00:00
v2 "github.com/hiddify/hiddify-core/v2"
2024-03-10 19:45:03 +01:00
)
func main() {
// defer C.free(unsafe.Pointer(port))
v2.StartGrpcServer("127.0.0.1:50051", "hello")
2024-03-10 19:45:03 +01:00
sigChan := make(chan os.Signal, 1)
signal.Notify(sigChan, os.Interrupt, syscall.SIGTERM)
<-sigChan
}