mirror of
https://github.com/smallnest/rpcx.git
synced 2025-09-26 20:21:14 +08:00
24 lines
348 B
Go
24 lines
348 B
Go
//go:build rdma
|
|
// +build rdma
|
|
|
|
package client
|
|
|
|
import (
|
|
"errors"
|
|
"net"
|
|
|
|
"github.com/smallnest/rsocket"
|
|
)
|
|
|
|
func init() {
|
|
ConnFactories["rdma"] = newRDMAConn
|
|
}
|
|
|
|
func newRDMAConn(c *Client, network, address string) (net.Conn, error) {
|
|
if network != "rdma" {
|
|
return nil, errors.New("network is not rdma")
|
|
}
|
|
|
|
return rsocket.DialTCP(address)
|
|
}
|