change npc sdk

pull/298/head
刘河 2019-12-08 15:46:33 +08:00
parent 9993ce8131
commit f938b2fdd1
1 changed files with 2 additions and 2 deletions

View File

@ -15,6 +15,7 @@ var cl *client.TRPClient
//export StartClientByVerifyKey //export StartClientByVerifyKey
func StartClientByVerifyKey(serverAddr, verifyKey, connType, proxyUrl *C.char) int { func StartClientByVerifyKey(serverAddr, verifyKey, connType, proxyUrl *C.char) int {
logs.SetLogger("store")
if cl != nil { if cl != nil {
closeBefore = 1 closeBefore = 1
cl.Close() cl.Close()
@ -50,12 +51,11 @@ func CloseClient() {
func Version() *C.char { func Version() *C.char {
return C.CString(version.VERSION) return C.CString(version.VERSION)
} }
//export Logs
func Logs() *C.char { func Logs() *C.char {
return C.CString(common.GetLogMsg()) return C.CString(common.GetLogMsg())
} }
func main() { func main() {
// Need a main function to make CGO compile package as C shared library // Need a main function to make CGO compile package as C shared library
logs.SetLogger("store")
} }