https://blog.csdn.net/github_26672553/article/details/100172819
之前介绍的方式只适合go系统和go系统之间调用(因为它数据编码使用了go的gob编码格式)。
想要其他异构系统(比如php)调用,就需要使用通用的编码格式,比如JSON。
1、jsonrpc服务端代码:
jsonrpc.ServeConn(client)
一句就搞定服务端代码
go客户端连接:
jsonrpc.Dial("tcp", "127.0.0.1:8080")
2、其他系统比如php中,如何来调用?