| /redis-3.2.3/src/ |
| H A D | anet.c | 555 if (port) *port = ntohs(s->sin_port); in anetTcpAccept() 559 if (port) *port = ntohs(s->sin6_port); in anetTcpAccept() 584 if (port) *port = ntohs(s->sin_port); in anetPeerToString() 588 if (port) *port = ntohs(s->sin6_port); in anetPeerToString() 591 if (port) *port = 0; in anetPeerToString() 606 if (port) *port = 0; in anetPeerToString() 621 int port; in anetFormatPeer() local 632 if (port) *port = 0; in anetSockName() 640 if (port) *port = ntohs(s->sin_port); in anetSockName() 644 if (port) *port = ntohs(s->sin6_port); in anetSockName() [all …]
|
| H A D | anet.h | 52 int anetTcpConnect(char *err, char *addr, int port); 53 int anetTcpNonBlockConnect(char *err, char *addr, int port); 54 int anetTcpNonBlockBindConnect(char *err, char *addr, int port, char *source_addr); 55 int anetTcpNonBlockBestEffortBindConnect(char *err, char *addr, int port, char *source_addr); 61 int anetTcpServer(char *err, int port, char *bindaddr, int backlog); 62 int anetTcp6Server(char *err, int port, char *bindaddr, int backlog); 64 int anetTcpAccept(char *err, int serversock, char *ip, size_t ip_len, int *port); 73 int anetPeerToString(int fd, char *ip, size_t ip_len, int *port); 75 int anetSockName(int fd, char *ip, size_t ip_len, int *port); 76 int anetFormatAddr(char *fmt, size_t fmt_len, char *ip, int port);
|
| H A D | sentinel.c | 50 int port; member 521 if (port < 0 || port > 65535) { in createSentinelAddr() 531 sa->port = port; in createSentinelAddr() 541 sa->port = src->port; in dupSentinelAddr() 553 return a->port == b->port && !strcasecmp(a->ip,b->ip); in sentinelAddrIsEqual() 1339 ri->addr->port == port))) in getSentinelRedisInstanceByAddrAndRunID() 2032 port = strchr(ip,','); if (!port) continue; in sentinelRefreshInstanceInfo() 2041 port = strstr(l,"port="); if (!port) continue; in sentinelRefreshInstanceInfo() 2933 long port; in sentinelCommand() local 3559 char port[32]; in sentinelAskMasterStateToOtherSentinels() local [all …]
|
| H A D | cluster.c | 474 myself->port = server.port; in clusterInit() 1257 if (port <= 0 || port > (65535-CLUSTER_PORT_INCR)) { in clusterStartHandshake() 1284 n->port = port; in clusterStartHandshake() 1345 node->port = ntohs(g->port); in clusterProcessGossipSection() 1395 if (node->port == port && strcmp(ip,node->ip) == 0) return 0; in nodeUpdateAddressIfNeeded() 1399 node->port = port; in nodeUpdateAddressIfNeeded() 1669 node->port = ntohs(hdr->port); in clusterProcessPacket() 2141 hdr->port = htons(server.port); in clusterBuildMessageHdr() 2276 gossip->port = htons(this->port); in clusterSendPing() 4562 name = sdscatlen(name,port->ptr,sdslen(port->ptr)); in migrateGetSocket() [all …]
|
| /redis-3.2.3/tests/ |
| H A D | instances.tcl | 59 set port [find_available_port $base_port] 61 puts "Starting $type #$j at port $port" 72 puts $cfg "port $port" 91 set link [redis 127.0.0.1 $port] 96 port $port \ 427 proc get_instance_id_by_port {type port} { argument 429 if {[get_instance_attrib $type $id port] == $port} { 433 fail "Instance $type port $port not found." 444 set port [get_instance_attrib $type $id port] 481 set port [get_instance_attrib $type $id port] [all …]
|
| H A D | test_helper.tcl | 129 set port [dict get $srv "port"] 131 set client [redis $host $port] 182 set port [find_available_port 11111] 184 puts "Starting test server at port $port" 186 socket -server accept_test_clients -myaddr 127.0.0.1 $port 194 --client $port --port $start_port &] 228 proc accept_test_clients {fd addr port} { argument 429 } elseif {$opt eq {--port}} {
|
| /redis-3.2.3/tests/support/ |
| H A D | server.tcl | 92 proc ping_server {host port} { argument 95 set fd [socket $host $port] 120 proc server_is_up {host port retrynum} { 124 if {[catch {ping_server $host $port} ping]} { 195 dict set config port $::port 256 set port $::port 258 if {[dict exists $config port]} { set port [dict get $config port] } 265 dict set srv "port" $port
|
| H A D | redis.tcl | 42 proc redis {{server 127.0.0.1} {port 6379} {defer 0}} { 43 set fd [socket $server $port] 47 set ::redis::addr($id) [list $server $port] 74 lassign $::redis::addr($id) host port 75 set ::redis::fd($id) [socket $host $port]
|
| /redis-3.2.3/utils/ |
| H A D | redis-sha1.rb | 49 port = ARGV[1] || "6379" 51 puts "Performing SHA1 of Redis server #{host} #{port} DB: #{db}" 52 p "Dataset SHA1: #{redisSha1(:host => host, :port => port.to_i, :db => db)}"
|
| /redis-3.2.3/tests/cluster/tests/ |
| H A D | 05-slave-selection.tcl | 21 set port0 [get_instance_attrib redis 0 port] 35 set cluster [redis_cluster 127.0.0.1:[get_instance_attrib redis 0 port]] 87 set port5 [get_instance_attrib redis 5 port]
|
| H A D | 12-replica-migration-2.tcl | 36 127.0.0.1:[get_instance_attrib redis 0 port] >@ stdout] 55 127.0.0.1:[get_instance_attrib redis 0 port] >@ stdout]
|
| H A D | 04-resharding.tcl | 56 set cluster [redis_cluster 127.0.0.1:[get_instance_attrib redis 0 port]] 80 127.0.0.1:[get_instance_attrib redis 0 port] \ 152 set masterport [get_instance_attrib redis $id port]
|
| /redis-3.2.3/tests/unit/ |
| H A D | dump.tcl | 64 set second_port [srv 0 port] 83 set second_port [srv 0 port] 103 set second_port [srv 0 port] 122 set second_port [srv 0 port] 143 set second_port [srv 0 port] 169 set second_port [srv 0 port] 190 set second_port [srv 0 port] 208 set second_port [srv 0 port] 229 set second_port [srv 0 port] 257 set second_port [srv 0 port] [all …]
|
| /redis-3.2.3/tests/integration/ |
| H A D | aof.tcl | 55 set client [redis [dict get $srv host] [dict get $srv port]] 72 set client [redis [dict get $srv host] [dict get $srv port]] 173 set client [redis [dict get $srv host] [dict get $srv port]] 197 set client [redis [dict get $srv host] [dict get $srv port]] 221 set client [redis [dict get $srv host] [dict get $srv port]] 244 set client [redis [dict get $srv host] [dict get $srv port]]
|
| H A D | replication-4.tcl | 1 proc start_bg_complex_data {host port db ops} { 3 exec $tclsh tests/helpers/bg_complex_data.tcl $host $port $db $ops & 15 set master_port [srv -1 port] 62 set master_port [srv -1 port] 104 set master_port [srv -1 port]
|
| H A D | replication.tcl | 11 set slave_port [srv 0 port] 16 set master_port [srv 0 port] 57 set A_port [srv 0 port] 61 set B_port [srv 0 port] 134 r slaveof [srv -1 host] [srv -1 port] 191 set master_port [srv 0 port]
|
| H A D | aof-race.tcl | 16 set client [redis [srv host] [srv port]] 32 set client [redis [srv host] [srv port]]
|
| H A D | replication-psync.tcl | 1 proc start_bg_complex_data {host port db ops} { 3 exec $tclsh tests/helpers/bg_complex_data.tcl $host $port $db $ops & 26 set master_port [srv -1 port]
|
| /redis-3.2.3/tests/sentinel/tests/ |
| H A D | 07-down-conditions.tcl | 29 lassign [S 4 SENTINEL GET-MASTER-ADDR-BY-NAME mymaster] host port 31 exec ../../../src/redis-cli -h $host -p $port debug sleep 10 > /dev/null & 37 lassign [S 4 SENTINEL GET-MASTER-ADDR-BY-NAME mymaster] host port
|
| /redis-3.2.3/tests/helpers/ |
| H A D | bg_complex_data.tcl | 4 proc bg_complex_data {host port db ops} { 5 set r [redis $host $port]
|
| H A D | gen_write_load.tcl | 3 proc gen_write_load {host port seconds} { 5 set r [redis $host $port 1]
|
| /redis-3.2.3/deps/hiredis/ |
| H A D | hiredis.h | 175 redisContext *redisConnect(const char *ip, int port); 176 redisContext *redisConnectWithTimeout(const char *ip, int port, const struct timeval tv); 177 redisContext *redisConnectNonBlock(const char *ip, int port); 178 redisContext *redisConnectBindNonBlock(const char *ip, int port, const char *source_addr);
|
| H A D | net.h | 44 int redisContextConnectTcp(redisContext *c, const char *addr, int port, const struct timeval *timeo… 45 int redisContextConnectBindTcp(redisContext *c, const char *addr, int port,
|
| H A D | net.c | 256 static int _redisContextConnectTcp(redisContext *c, const char *addr, int port, in _redisContextConnectTcp() argument 264 snprintf(_port, 6, "%d", port); in _redisContextConnectTcp() 345 int redisContextConnectTcp(redisContext *c, const char *addr, int port, in redisContextConnectTcp() argument 347 return _redisContextConnectTcp(c, addr, port, timeout, NULL); in redisContextConnectTcp() 350 int redisContextConnectBindTcp(redisContext *c, const char *addr, int port, in redisContextConnectBindTcp() argument 353 return _redisContextConnectTcp(c, addr, port, timeout, source_addr); in redisContextConnectBindTcp()
|
| H A D | async.h | 104 redisAsyncContext *redisAsyncConnect(const char *ip, int port); 105 redisAsyncContext *redisAsyncConnectBind(const char *ip, int port, const char *source_addr);
|