Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pistache
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
pistache
Commits
7756972a
Unverified
Commit
7756972a
authored
Mar 03, 2020
by
Igor [hyperxor]
Committed by
GitHub
Mar 02, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes in Http: make onConnection and onDisconnection methods private (#727)
parent
8b04ca8c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
+11
-10
include/pistache/http.h
include/pistache/http.h
+2
-10
include/pistache/net.h
include/pistache/net.h
+9
-0
No files found.
include/pistache/http.h
View file @
7756972a
...
...
@@ -26,7 +26,6 @@
#include <pistache/stream.h>
#include <pistache/tcp.h>
#include <pistache/transport.h>
#include <pistache/view.h>
namespace
Pistache
{
namespace
Tcp
{
...
...
@@ -568,9 +567,6 @@ using ResponseParser = Private::ParserImpl<Http::Response>;
class
Handler
:
public
Tcp
::
Handler
{
public:
void
onConnection
(
const
std
::
shared_ptr
<
Tcp
::
Peer
>
&
peer
)
override
;
void
onDisconnection
(
const
std
::
shared_ptr
<
Tcp
::
Peer
>
&
peer
)
override
;
virtual
void
onRequest
(
const
Request
&
request
,
ResponseWriter
response
)
=
0
;
virtual
void
onTimeout
(
const
Request
&
request
,
ResponseWriter
response
);
...
...
@@ -583,6 +579,8 @@ public:
virtual
~
Handler
()
override
{}
private:
void
onConnection
(
const
std
::
shared_ptr
<
Tcp
::
Peer
>
&
peer
)
override
;
void
onDisconnection
(
const
std
::
shared_ptr
<
Tcp
::
Peer
>
&
peer
)
override
;
void
onInput
(
const
char
*
buffer
,
size_t
len
,
const
std
::
shared_ptr
<
Tcp
::
Peer
>
&
peer
)
override
;
RequestParser
&
getParser
(
const
std
::
shared_ptr
<
Tcp
::
Peer
>
&
peer
)
const
;
...
...
@@ -603,11 +601,5 @@ std::shared_ptr<H> make_handler(Args &&... args) {
return
std
::
make_shared
<
H
>
(
std
::
forward
<
Args
>
(
args
)...);
}
namespace
helpers
{
inline
Address
httpAddr
(
const
StringView
&
view
)
{
auto
const
str
=
view
.
toString
();
return
Address
(
str
);
}
}
// namespace helpers
}
// namespace Http
}
// namespace Pistache
include/pistache/net.h
View file @
7756972a
...
...
@@ -6,6 +6,8 @@
#pragma once
#include <pistache/view.h>
#include <cstring>
#include <limits>
#include <stdexcept>
...
...
@@ -154,6 +156,13 @@ private:
Port
port_
;
};
namespace
helpers
{
inline
Address
httpAddr
(
const
StringView
&
view
)
{
auto
const
str
=
view
.
toString
();
return
Address
(
str
);
}
}
// namespace helpers
class
Error
:
public
std
::
runtime_error
{
public:
explicit
Error
(
const
char
*
message
);
...
...
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