Page Speed Optimization Libraries
1.13.35.1
|
#include "tcp_connection_for_testing.h"
Public Member Functions | |
bool | Connect (const GoogleString &hostname, int port) |
void | Send (StringPiece data) |
GoogleString | ReadBytes (int length) |
Reads specific amount of bytes, fais if EOF happens before. | |
GoogleString | ReadLine () |
LF is included unless EOF happened before it. | |
GoogleString | ReadLineCrLf () |
CRLF is included unless EOF happened before it. | |
GoogleString | ReadUntil (StringPiece marker) |
Returns data read, marker is included unless EOF happened before it. | |
Simple TCP connection class for talking to external servers. Initiates connection in Connect(), closes it in destructor. Does not handle any errors except for connection failure, crashes with CHECK() failures on the rest.