mirror of
https://github.com/smallnest/rpcx.git
synced 2025-10-05 08:06:58 +08:00
24 lines
350 B
Go
24 lines
350 B
Go
//go:build linux
|
|
// +build linux
|
|
|
|
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)
|
|
}
|