mirror of https://github.com/davisking/dlib.git
simplified examples
This commit is contained in:
parent
e56b4c533e
commit
06501db2e8
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue