Add a rpc_set_fd() fucntion which can be used to swap the underlying socket file...
[deb_libnfs.git] / lib / socket.c
index 152dfb4a44df57528ccc7106348bcf32afb14764..b750d6f16d275c1faee7a1d2a300ea0fa1cba296 100644 (file)
@@ -707,3 +707,10 @@ int rpc_queue_length(struct rpc_context *rpc)
        }
        return i;
 }
+
+void rpc_set_fd(struct rpc_context *rpc, int fd)
+{
+       assert(rpc->magic == RPC_CONTEXT_MAGIC);
+
+       rpc->fd = fd;
+}