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
06501db2
Commit
06501db2
authored
Nov 17, 2012
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplified examples
parent
e56b4c53
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
sockets_ex_2.cpp
examples/sockets_ex_2.cpp
+1
-1
sockstreambuf_ex.cpp
examples/sockstreambuf_ex.cpp
+2
-4
No files found.
examples/sockets_ex_2.cpp
View file @
06501db2
...
...
@@ -34,7 +34,7 @@ int main()
{
// Create a stream buffer for our connection
sockstreambuf
::
kernel_2a
buf
(
con
);
sockstreambuf
buf
(
con
);
// Now stick that stream buffer into an iostream object
iostream
stream
(
&
buf
);
// This command causes the iostream to flush its output buffers
...
...
examples/sockstreambuf_ex.cpp
View file @
06501db2
...
...
@@ -39,10 +39,8 @@ class serv : public server
connection
&
con
)
{
// create a sockstreambuf that reads/writes on our connection. I'm using the
// kernel_2a version here because it is generally the faster of the two versions in the
// library.
sockstreambuf
::
kernel_2a
buf
(
&
con
);
// create a sockstreambuf that reads/writes on our connection.
sockstreambuf
buf
(
&
con
);
// Now we make an iostream object that reads/writes to our streambuffer. A lot of people
// don't seem to know that the C++ iostreams are as powerful as they are. So what I'm doing
...
...
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