diff options
Diffstat (limited to 'net/tools/quic/quic_socket_utils.h')
-rw-r--r-- | net/tools/quic/quic_socket_utils.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/net/tools/quic/quic_socket_utils.h b/net/tools/quic/quic_socket_utils.h index 8f0feff..bfacc6c 100644 --- a/net/tools/quic/quic_socket_utils.h +++ b/net/tools/quic/quic_socket_utils.h @@ -12,7 +12,6 @@ #include <string> #include "net/base/ip_endpoint.h" -#include "net/quic/quic_protocol.h" namespace net { namespace tools { @@ -46,13 +45,12 @@ class QuicSocketUtils { IPAddressNumber* self_address, IPEndPoint* peer_address); - // Writes buf_len to the socket. If writing is successful, sets the result's - // status to WRITE_STATUS_OK and sets bytes_written. Otherwise sets the - // result's status to WRITE_STATUS_BLOCKED or WRITE_STATUS_ERROR and sets - // error_code to errno. - static WriteResult WritePacket(int fd, const char* buffer, size_t buf_len, - const IPAddressNumber& self_address, - const IPEndPoint& peer_address); + // Writes buf_len to the socket. If writing is successful returns the number + // of bytes written otherwise returns -1 and sets error to errno. + static int WritePacket(int fd, const char* buffer, size_t buf_len, + const IPAddressNumber& self_address, + const IPEndPoint& peer_address, + int* error); }; } // namespace tools |