Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
6d49110a
Commit
6d49110a
authored
Feb 07, 2016
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename FrontendAddr as UpstreamAddr
parent
b540aa34
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
21 additions
and
21 deletions
+21
-21
src/shrpx.cc
src/shrpx.cc
+3
-3
src/shrpx_accept_handler.cc
src/shrpx_accept_handler.cc
+1
-1
src/shrpx_accept_handler.h
src/shrpx_accept_handler.h
+3
-3
src/shrpx_client_handler.cc
src/shrpx_client_handler.cc
+1
-1
src/shrpx_client_handler.h
src/shrpx_client_handler.h
+2
-2
src/shrpx_config.cc
src/shrpx_config.cc
+1
-1
src/shrpx_config.h
src/shrpx_config.h
+2
-2
src/shrpx_connection_handler.cc
src/shrpx_connection_handler.cc
+1
-1
src/shrpx_connection_handler.h
src/shrpx_connection_handler.h
+2
-2
src/shrpx_ssl.cc
src/shrpx_ssl.cc
+1
-1
src/shrpx_ssl.h
src/shrpx_ssl.h
+2
-2
src/shrpx_worker.h
src/shrpx_worker.h
+2
-2
No files found.
src/shrpx.cc
View file @
6d49110a
...
...
@@ -430,7 +430,7 @@ struct InheritedAddr {
};
namespace
{
int
create_unix_domain_server_socket
(
Frontend
Addr
&
faddr
,
int
create_unix_domain_server_socket
(
Upstream
Addr
&
faddr
,
std
::
vector
<
InheritedAddr
>
&
iaddrs
)
{
auto
found
=
std
::
find_if
(
std
::
begin
(
iaddrs
),
std
::
end
(
iaddrs
),
[
&
faddr
](
const
InheritedAddr
&
ia
)
{
...
...
@@ -512,7 +512,7 @@ int create_unix_domain_server_socket(FrontendAddr &faddr,
}
// namespace
namespace
{
int
create_tcp_server_socket
(
Frontend
Addr
&
faddr
,
int
create_tcp_server_socket
(
Upstream
Addr
&
faddr
,
std
::
vector
<
InheritedAddr
>
&
iaddrs
)
{
int
fd
=
-
1
;
int
rv
;
...
...
@@ -2007,7 +2007,7 @@ void process_options(
auto
&
downstreamconf
=
mod_config
()
->
conn
.
downstream
;
if
(
listenerconf
.
addrs
.
empty
())
{
Frontend
Addr
addr
{};
Upstream
Addr
addr
{};
addr
.
host
=
"*"
;
addr
.
port
=
3000
;
addr
.
family
=
AF_INET
;
...
...
src/shrpx_accept_handler.cc
View file @
6d49110a
...
...
@@ -45,7 +45,7 @@ void acceptcb(struct ev_loop *loop, ev_io *w, int revent) {
}
}
// namespace
AcceptHandler
::
AcceptHandler
(
const
Frontend
Addr
*
faddr
,
ConnectionHandler
*
h
)
AcceptHandler
::
AcceptHandler
(
const
Upstream
Addr
*
faddr
,
ConnectionHandler
*
h
)
:
conn_hnr_
(
h
),
faddr_
(
faddr
)
{
ev_io_init
(
&
wev_
,
acceptcb
,
faddr_
->
fd
,
EV_READ
);
wev_
.
data
=
this
;
...
...
src/shrpx_accept_handler.h
View file @
6d49110a
...
...
@@ -32,11 +32,11 @@
namespace
shrpx
{
class
ConnectionHandler
;
struct
Frontend
Addr
;
struct
Upstream
Addr
;
class
AcceptHandler
{
public:
AcceptHandler
(
const
Frontend
Addr
*
faddr
,
ConnectionHandler
*
h
);
AcceptHandler
(
const
Upstream
Addr
*
faddr
,
ConnectionHandler
*
h
);
~
AcceptHandler
();
void
accept_connection
();
void
enable
();
...
...
@@ -46,7 +46,7 @@ public:
private:
ev_io
wev_
;
ConnectionHandler
*
conn_hnr_
;
const
Frontend
Addr
*
faddr_
;
const
Upstream
Addr
*
faddr_
;
};
}
// namespace shrpx
...
...
src/shrpx_client_handler.cc
View file @
6d49110a
...
...
@@ -378,7 +378,7 @@ int ClientHandler::upstream_http1_connhd_read() {
ClientHandler
::
ClientHandler
(
Worker
*
worker
,
int
fd
,
SSL
*
ssl
,
const
char
*
ipaddr
,
const
char
*
port
,
int
family
,
const
Frontend
Addr
*
faddr
)
const
Upstream
Addr
*
faddr
)
:
conn_
(
worker
->
get_loop
(),
fd
,
ssl
,
worker
->
get_mcpool
(),
get_config
()
->
conn
.
upstream
.
timeout
.
write
,
get_config
()
->
conn
.
upstream
.
timeout
.
read
,
...
...
src/shrpx_client_handler.h
View file @
6d49110a
...
...
@@ -53,7 +53,7 @@ struct WorkerStat;
class
ClientHandler
{
public:
ClientHandler
(
Worker
*
worker
,
int
fd
,
SSL
*
ssl
,
const
char
*
ipaddr
,
const
char
*
port
,
int
family
,
const
Frontend
Addr
*
faddr
);
const
char
*
port
,
int
family
,
const
Upstream
Addr
*
faddr
);
~
ClientHandler
();
int
noop
();
...
...
@@ -158,7 +158,7 @@ private:
std
::
function
<
int
(
ClientHandler
&
)
>
read_
,
write_
;
std
::
function
<
int
(
ClientHandler
&
)
>
on_read_
,
on_write_
;
// Address of frontend listening socket
const
Frontend
Addr
*
faddr_
;
const
Upstream
Addr
*
faddr_
;
Worker
*
worker_
;
// The number of bytes of HTTP/2 client connection header to read
size_t
left_connhd_len_
;
...
...
src/shrpx_config.cc
View file @
6d49110a
...
...
@@ -1460,7 +1460,7 @@ int parse_config(const char *opt, const char *optarg,
case
SHRPX_OPTID_FRONTEND
:
{
auto
&
listenerconf
=
mod_config
()
->
conn
.
listener
;
Frontend
Addr
addr
{};
Upstream
Addr
addr
{};
addr
.
fd
=
-
1
;
if
(
util
::
istarts_with
(
optarg
,
SHRPX_UNIX_PATH_PREFIX
))
{
...
...
src/shrpx_config.h
View file @
6d49110a
...
...
@@ -252,7 +252,7 @@ struct AltSvc {
uint16_t
port
;
};
struct
Frontend
Addr
{
struct
Upstream
Addr
{
// The frontend address (e.g., FQDN, hostname, IP address). If
// |host_unix| is true, this is UNIX domain socket path.
ImmutableString
host
;
...
...
@@ -500,7 +500,7 @@ struct ConnectionConfig {
ev_tstamp
sleep
;
}
timeout
;
// address of frontend acceptors
std
::
vector
<
Frontend
Addr
>
addrs
;
std
::
vector
<
Upstream
Addr
>
addrs
;
int
backlog
;
// TCP fastopen. If this is positive, it is passed to
// setsockopt() along with TCP_FASTOPEN.
...
...
src/shrpx_connection_handler.cc
View file @
6d49110a
...
...
@@ -298,7 +298,7 @@ void ConnectionHandler::graceful_shutdown_worker() {
}
int
ConnectionHandler
::
handle_connection
(
int
fd
,
sockaddr
*
addr
,
int
addrlen
,
const
Frontend
Addr
*
faddr
)
{
const
Upstream
Addr
*
faddr
)
{
if
(
LOG_ENABLED
(
INFO
))
{
LLOG
(
INFO
,
this
)
<<
"Accepted connection. fd="
<<
fd
;
}
...
...
src/shrpx_connection_handler.h
View file @
6d49110a
...
...
@@ -58,7 +58,7 @@ class Worker;
struct
WorkerStat
;
struct
TicketKeys
;
class
MemcachedDispatcher
;
struct
Frontend
Addr
;
struct
Upstream
Addr
;
struct
OCSPUpdateContext
{
// ocsp response buffer
...
...
@@ -81,7 +81,7 @@ public:
ConnectionHandler
(
struct
ev_loop
*
loop
);
~
ConnectionHandler
();
int
handle_connection
(
int
fd
,
sockaddr
*
addr
,
int
addrlen
,
const
Frontend
Addr
*
faddr
);
const
Upstream
Addr
*
faddr
);
// Creates Worker object for single threaded configuration.
int
create_single_worker
();
// Creates |num| Worker objects for multi threaded configuration.
...
...
src/shrpx_ssl.cc
View file @
6d49110a
...
...
@@ -779,7 +779,7 @@ SSL *create_ssl(SSL_CTX *ssl_ctx) {
}
ClientHandler
*
accept_connection
(
Worker
*
worker
,
int
fd
,
sockaddr
*
addr
,
int
addrlen
,
const
Frontend
Addr
*
faddr
)
{
int
addrlen
,
const
Upstream
Addr
*
faddr
)
{
char
host
[
NI_MAXHOST
];
char
service
[
NI_MAXSERV
];
int
rv
;
...
...
src/shrpx_ssl.h
View file @
6d49110a
...
...
@@ -45,7 +45,7 @@ class ClientHandler;
class
Worker
;
class
DownstreamConnectionPool
;
struct
DownstreamAddr
;
struct
Frontend
Addr
;
struct
Upstream
Addr
;
namespace
ssl
{
...
...
@@ -77,7 +77,7 @@ SSL_CTX *create_ssl_client_context(
);
ClientHandler
*
accept_connection
(
Worker
*
worker
,
int
fd
,
sockaddr
*
addr
,
int
addrlen
,
const
Frontend
Addr
*
faddr
);
int
addrlen
,
const
Upstream
Addr
*
faddr
);
// Check peer's certificate against first downstream address in
// Config::downstream_addrs. We only consider first downstream since
...
...
src/shrpx_worker.h
View file @
6d49110a
...
...
@@ -53,7 +53,7 @@ namespace shrpx {
class
Http2Session
;
class
ConnectBlocker
;
class
MemcachedDispatcher
;
struct
Frontend
Addr
;
struct
Upstream
Addr
;
#ifdef HAVE_MRUBY
namespace
mruby
{
...
...
@@ -96,7 +96,7 @@ struct WorkerEvent {
sockaddr_union
client_addr
;
size_t
client_addrlen
;
int
client_fd
;
const
Frontend
Addr
*
faddr
;
const
Upstream
Addr
*
faddr
;
};
std
::
shared_ptr
<
TicketKeys
>
ticket_keys
;
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment