mt4-redis icon indicating copy to clipboard operation
mt4-redis copied to clipboard

cmd返回全是-1

Open xiaosiwei opened this issue 5 years ago • 2 comments

请问一下,我编译好DLL,放到Libraries中,用您这边的例程返回全是 -1,这个应该怎么处理呢

xiaosiwei avatar Nov 13 '19 16:11 xiaosiwei

The retrun value of - 1 is usually the following two error cases,defined in MT4RedisPlugin.h

#define MT4_REDIS_ERR -1 /* Error */ #define MT4_REDIS_CMD_FAILED -1 /* Failed */

First, check that your PC is properly connected to the Redis server. Here are the parameters for connecting to Redis server. defined in MT4RedisPlugin.cpp

#define REDIS_SERVER "127.0.0.1" #define REDIS_PORT 6379 #define CONNECT_TIMEOUT 3000

Second, make sure your Redis command is not too long When writing data into Redis, writing long texts/binary data might cause buffer overflow, default size is set to 1024. defined in MT4RedisPlugin.cpp

#define COMMAND_BUFFER 1024

don't forget recompile your source code after modification.

limccn avatar Nov 14 '19 03:11 limccn

ok.thx

xiaosiwei avatar Nov 15 '19 06:11 xiaosiwei