站点RPC方法
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
323 B

3 years ago
  1. package siterpc
  2. var DES_KEY = "confdata"
  3. func rpc_server_conn(url ...string) (*SiteServiceClient, error) {
  4. var wx_rpc_url string = "127.0.0.1:7971"
  5. if len(url) > 0 && url[0] != "" {
  6. wx_rpc_url = url[0]
  7. }
  8. conn, _, err := DialSiteService("tcp", wx_rpc_url)
  9. if err != nil {
  10. return nil, err
  11. }
  12. return conn, nil
  13. }