标签:comm class orm var show client 客户 redis send
怎样连接REDIS服务端
1)创建REDIS客户端对象
procedure TForm1.FormCreate(Sender: TObject); begin Redis := TsfRedisClient.Create(); ConnRedisServer(‘127.0.0.1‘, ‘‘, 6379); end;
2)连接并验证
procedure TForm1.ConnRedisServer(ip, password: string; port: Integer); var s: string; begin Redis.Connect(ip, port); if password <> ‘‘ then begin s := Redis.doCommand([‘AUTH‘, password]); if s <> ‘OK‘ then begin ShowMessage(s); Exit; end; end; end;
标签:comm class orm var show client 客户 redis send
原文地址:https://www.cnblogs.com/hnxxcxg/p/10467290.html