Files
rpcx/client/connection_rdma.go
2024-12-02 18:28:54 +08:00

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)
}