Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
96e1a7c8
Commit
96e1a7c8
authored
Nov 17, 2012
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed cruft
parent
d3b5425a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
http_client.cpp
dlib/http_client/http_client.cpp
+4
-4
iosockstream.h
dlib/iosockstream/iosockstream.h
+3
-3
sockets_extensions.cpp
dlib/sockets/sockets_extensions.cpp
+1
-1
No files found.
dlib/http_client/http_client.cpp
View file @
96e1a7c8
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
namespace
dlib
namespace
dlib
{
{
typedef
dlib
::
shared_ptr
<
dlib
::
timeout
::
kernel_1a
>
timeout_ptr
;
typedef
dlib
::
shared_ptr
<
dlib
::
timeout
>
timeout_ptr
;
#ifdef _MSC_VER
#ifdef _MSC_VER
...
@@ -564,7 +564,7 @@ namespace dlib
...
@@ -564,7 +564,7 @@ namespace dlib
// Implement a timeout
// Implement a timeout
timeout_ptr
t
;
timeout_ptr
t
;
if
(
timeout
>
0
)
if
(
timeout
>
0
)
t
.
reset
(
new
dlib
::
timeout
::
kernel_1a
(
*
conn
,
&
dlib
::
connection
::
shutdown
,
timeout
)
);
t
.
reset
(
new
dlib
::
timeout
(
*
conn
,
&
dlib
::
connection
::
shutdown
,
timeout
)
);
// Write our request
// Write our request
conn
->
write
(
request_build
.
c_str
(),
static_cast
<
long
>
(
request_build
.
size
()));
conn
->
write
(
request_build
.
c_str
(),
static_cast
<
long
>
(
request_build
.
size
()));
...
@@ -577,7 +577,7 @@ namespace dlib
...
@@ -577,7 +577,7 @@ namespace dlib
bool
read_headers
(
true
);
bool
read_headers
(
true
);
if
(
timeout
>
0
)
if
(
timeout
>
0
)
t
.
reset
(
new
dlib
::
timeout
::
kernel_1a
(
*
conn
,
&
dlib
::
connection
::
shutdown
,
timeout
)
);
t
.
reset
(
new
dlib
::
timeout
(
*
conn
,
&
dlib
::
connection
::
shutdown
,
timeout
)
);
while
(
(
bytes_read
=
conn
->
read
(
buf
,
512
))
>
0
)
while
(
(
bytes_read
=
conn
->
read
(
buf
,
512
))
>
0
)
{
{
...
@@ -694,7 +694,7 @@ namespace dlib
...
@@ -694,7 +694,7 @@ namespace dlib
}
}
if
(
timeout
>
0
)
if
(
timeout
>
0
)
t
.
reset
(
new
dlib
::
timeout
::
kernel_1a
(
*
conn
,
&
dlib
::
connection
::
shutdown
,
timeout
)
);
t
.
reset
(
new
dlib
::
timeout
(
*
conn
,
&
dlib
::
connection
::
shutdown
,
timeout
)
);
}
// while still data to read
}
// while still data to read
t
.
reset
();
t
.
reset
();
...
...
dlib/iosockstream/iosockstream.h
View file @
96e1a7c8
...
@@ -78,7 +78,7 @@ namespace dlib
...
@@ -78,7 +78,7 @@ namespace dlib
{
{
if
(
buf
)
if
(
buf
)
{
{
timeout
::
kernel_1a
t
(
*
con
,
&
connection
::
shutdown
,
timeout
);
dlib
::
timeout
t
(
*
con
,
&
connection
::
shutdown
,
timeout
);
// This will flush the sockstreambuf and also destroy it.
// This will flush the sockstreambuf and also destroy it.
buf
.
reset
();
buf
.
reset
();
...
@@ -110,7 +110,7 @@ namespace dlib
...
@@ -110,7 +110,7 @@ namespace dlib
{
{
if
(
con
)
if
(
con
)
{
{
con_timeout
.
reset
(
new
timeout
::
kernel_1a
(
*
this
,
&
iosockstream
::
terminate_connection
,
timeout
,
con
));
con_timeout
.
reset
(
new
dlib
::
timeout
(
*
this
,
&
iosockstream
::
terminate_connection
,
timeout
,
con
));
}
}
}
}
...
@@ -123,7 +123,7 @@ namespace dlib
...
@@ -123,7 +123,7 @@ namespace dlib
thecon
->
shutdown
();
thecon
->
shutdown
();
}
}
scoped_ptr
<
timeout
::
kernel_1a
>
con_timeout
;
scoped_ptr
<
timeout
>
con_timeout
;
shared_ptr_thread_safe
<
connection
>
con
;
shared_ptr_thread_safe
<
connection
>
con
;
scoped_ptr
<
sockstreambuf
>
buf
;
scoped_ptr
<
sockstreambuf
>
buf
;
...
...
dlib/sockets/sockets_extensions.cpp
View file @
96e1a7c8
...
@@ -316,7 +316,7 @@ namespace dlib
...
@@ -316,7 +316,7 @@ namespace dlib
try
try
{
{
timeout
::
kernel_1a
t
(
*
con
,
&
connection
::
shutdown
,
timeout
);
dlib
::
timeout
t
(
*
con
,
&
connection
::
shutdown
,
timeout
);
char
junk
[
100
];
char
junk
[
100
];
// wait for the other end to close their side
// wait for the other end to close their side
...
...
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