simplified examples

This commit is contained in:
Davis King 2012-11-17 12:07:04 -05:00
parent e56b4c533e
commit 06501db2e8
2 changed files with 3 additions and 5 deletions

View File

@ -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

View File

@ -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