Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
net_instaweb::TcpConnectionForTesting Class Reference

#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.
 

Detailed Description

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.


The documentation for this class was generated from the following file: