// TcpStreamBugTest.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include #include #include using namespace ost; using namespace std; #define MAX_READ_BUF 1024 void test1(){ char buf[MAX_READ_BUF]; TCPStream m_str("194.87.0.50", 80); // www.ru m_str<<"GET"<(m_str), std::istreambuf_iterator(), std::ostream_iterator(std::cout)); if(m_str.good()) cout << "TCPStream good" << endl; else cout << "TCPStream fail" << endl; } int _tmain(int argc, _TCHAR* argv[]) { cout << "TCPStream bug Test1..." << endl; test1(); cout << endl << "TCPStream bug Test2..." << endl; test2(); return 0; }