Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
96e1a7c8
Commit
96e1a7c8
authored
Nov 17, 2012
by
Davis King
Browse files
Removed cruft
parent
d3b5425a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
dlib/http_client/http_client.cpp
dlib/http_client/http_client.cpp
+4
-4
dlib/iosockstream/iosockstream.h
dlib/iosockstream/iosockstream.h
+3
-3
dlib/sockets/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