boost::asio TCP客户端编程示例
(2011-05-09 14:56:39)
标签:
杂谈 |
分类: CPP/C |
view plaincopy to clipboardprint?
// testASIOClient.cpp : Defines the entry point for the console
application.
//
#include "stdafx.h"
#include
<boost/asio.hpp>
#include
<boost/bind.hpp>
#include
<boost/lexical_cast.hpp>
#include
<iostream>
using
boost::asio::io_service;
using
boost::asio::ip::tcp;
#define ASYNCHRONOUS
#ifndef ASYNCHRONOUS
class
Client
{
public:
private:
};
Client::Client (const string & hostname, unsigned
short
port)
{

加载中…