Return the last error.
error_code last_error() const;
This returns the last error code which was generated in the most recent call to write_some.
write_some
Constant.
No-throw guarantee.