Commit 06501db2 authored by Davis King's avatar Davis King

simplified examples

parent e56b4c53
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment