Home
last modified time | relevance | path

Searched refs:port (Results 1 – 25 of 59) sorted by relevance

123

/redis-3.2.3/src/
H A Danet.c555 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 Danet.h52 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 Dsentinel.c50 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 Dcluster.c474 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 Dinstances.tcl59 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 Dtest_helper.tcl129 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 Dserver.tcl92 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 Dredis.tcl42 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 Dredis-sha1.rb49 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 D05-slave-selection.tcl21 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 D12-replica-migration-2.tcl36 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 D04-resharding.tcl56 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 Ddump.tcl64 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 Daof.tcl55 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 Dreplication-4.tcl1 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 Dreplication.tcl11 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 Daof-race.tcl16 set client [redis [srv host] [srv port]]
32 set client [redis [srv host] [srv port]]
H A Dreplication-psync.tcl1 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 D07-down-conditions.tcl29 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 Dbg_complex_data.tcl4 proc bg_complex_data {host port db ops} {
5 set r [redis $host $port]
H A Dgen_write_load.tcl3 proc gen_write_load {host port seconds} {
5 set r [redis $host $port 1]
/redis-3.2.3/deps/hiredis/
H A Dhiredis.h175 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 Dnet.h44 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 Dnet.c256 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 Dasync.h104 redisAsyncContext *redisAsyncConnect(const char *ip, int port);
105 redisAsyncContext *redisAsyncConnectBind(const char *ip, int port, const char *source_addr);

123