27.12.2014 Views

Using TCP Through Sockets

Using TCP Through Sockets

Using TCP Through Sockets

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

libasync also provides three classes for reporting errors to the user, warn, fatal, and panic.<br />

warn simply prints a message to the termial, much like the C++ standard library’s cerr. For<br />

example, one might say:<br />

int n = write (fd, buf, nbytes);<br />

if (n < 0 && errno != EAGAIN) {<br />

warn

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!