| 14 | // ---------------------------------------------------------------------------------------- |
| 15 | |
| 16 | sockstreambuf_unbuffered::int_type sockstreambuf_unbuffered:: |
| 17 | overflow ( |
| 18 | int_type c |
| 19 | ) |
| 20 | { |
| 21 | if (c != EOF) |
| 22 | { |
| 23 | char temp = static_cast<char>(c); |
| 24 | if (con.write(&temp,1) != 1) |
| 25 | { |
| 26 | // if the write was not successful |
| 27 | return EOF; |
| 28 | } |
| 29 | } |
| 30 | return c; |
| 31 | } |
| 32 | |
| 33 | // ---------------------------------------------------------------------------------------- |
| 34 |