chezmoi net
1.0.0
هذا هو تطبيق JsonRPC2 ثنائي الاتجاه عبر Web Switch. يتم توفير المثال الأساسي ضمن حزمة chatclient. يمكنك تشغيل المثال بواسطة .
go run cmd/server/server.go
go run cmd/client/client.go
go run cmd/client/client.go -join
// Use the client package register service functions
client.RegisterService(chatClient, chatClient.Client, chatClient.target)
// use client instance to get rpcClient
rpcClient := chatClient.Client.GetRpcClientForService(*chatClient)
sname := chatClient.Client.GetServiceName(*chatClient)
if rpcClient != nil {
var reply string
rpcClient.Call(sname+".OnMessage", Message{Source: *chatClient.Client.Id, Message: message}, &reply)
}
https://github.com/nmorenor/chezmoi
https://nmorenor.com