I created an async server based heavily off of the [Daytime Async TCP Server example](http://www.boost.org/doc/libs/1_53_0/doc/html/boost_asio/tutorial/tutdaytime3.html), but using C++11 instead of boost. Here's the server class:

```
 class TcpServer {
  public:
    static std::shared_ptr<TcpServer> make(int port);
    ~TcpServer();
    void start();
  protected:
      TcpServer(int port);
      void init(int port);
      void createSession();
      void onConnect(std::vector<std::shared_ptr<TcpSession>>::iterator session_iter, const asio::error_code& error);
      asio::io_service mService;
      std::thread mServiceThread;
      asio::ip::tcp::acceptor mAcceptor;
      asio::ip::tcp::socket mSocket;
      asio::ip::tcp::endpoint mLocalEndpoint;
      std::vector < std::shared_ptr<TcpSession>> mSessions;
  };

std::shared_ptr<TcpServer> TcpServer::make(int port) {
    std::shared_ptr<TcpServer> Server(new TcpServer(port));
    return Server;
}

TcpServer::TcpServer(int port) : mSocket(mService), mAcceptor(mService) {
    init(port);
}

TcpServer::~TcpServer() {
    mSocket.cancel();
    mService.stop();
    if (mServiceThread.joinable()) {
        mServiceThread.join();
    }
}

void TcpServer::start() {
    createSession();
}

void TcpServer::init(int port) {
    mLocalEndpoint = asio::ip::tcp::endpoint(asio::ip::tcp::v4(), port);

    std::printf("TcpServer -- Creating endpoint %s:%d ...\n", mLocalEndpoint.address().to_string().c_str(), mLocalEndpoint.port());

    mAcceptor.open(mLocalEndpoint.protocol());
    mAcceptor.set_option(asio::ip::tcp::acceptor::reuse_address(true));
    mAcceptor.bind(mLocalEndpoint);
    mAcceptor.listen();

    mServiceThread = std::thread([&] {
        mService.run();
    });

}

void TcpServer::createSession() {
    std::printf("TcpServer -- Creating new session...\n");
    std::shared_ptr<TcpSession> newSession = TcpSession::make(mService);
    std::vector<std::shared_ptr<TcpSession>>::iterator iterator = mSessions.insert(mSessions.end(), newSession);

    mAcceptor.async_accept(newSession->getSocket(), 
      [this, iterator](const asio::error_code &error) {
      std::printf("Async Accept\n");
      onConnect(iterator, error);
    });
}

void TcpServer::onConnect(std::vector<std::shared_ptr<TcpSession>>::iterator session_iter, const asio::error_code& error) {
    if (!error) {
        std::printf("TcpServer -- Connection from %s received!\n", (*session_iter)->getSocket().remote_endpoint().address().to_string().c_str());

    // Write a response
    //auto buff = std::make_shared<std::string>("Hello World!\r\n\r\n");

    //asio::async_write((*session_iter)->getSocket(), asio::buffer(*buff), 
    //  [this, session_iter](const asio::error_code &error, std::size_t bytesReceived) {
    //  onWrite(session_iter, error, bytesReceived);
    //});

    // begin listening
    //receive(session_iter);

}
else {
    std::printf("TcpServer::onConnect -- Error receiving data. %s\n", error.message().c_str());
    mSessions.erase(session_iter);
}
}

```

and then small TcpSession class:

```
class TcpSession {
    public:
        ~TcpSession();
        static std::shared_ptr<TcpSession> make(asio::io_service& service){
        asio::ip::tcp::socket& getSocket() {
            return mSocket;
        }
    protected:
        TcpSession(asio::io_service& service);
        asio::ip::tcp::socket mSocket;
    };

```

I create an instance of the server and run it like so:

```
void main() {
    mServer = TcpServer::make(8060);
    mServer->start();
}

```

I then try to connect to it with a lightweight TCP/IP app like TCP/IP Builder (for Windows); however, I never see any of the messages from `onConnect` suggesting that I've made a connection.

Does anyone have any suggestions of what might be wrong?

thanks!