19a1e991dSShuo Chen// excerpts from http://code.google.com/p/muduo/ 29a1e991dSShuo Chen// 39a1e991dSShuo Chen// Use of this source code is governed by a BSD-style license 49a1e991dSShuo Chen// that can be found in the License file. 59a1e991dSShuo Chen// 69a1e991dSShuo Chen// Author: Shuo Chen (chenshuo at chenshuo dot com) 79a1e991dSShuo Chen 89a1e991dSShuo Chen#ifndef MUDUO_NET_CALLBACKS_H 99a1e991dSShuo Chen#define MUDUO_NET_CALLBACKS_H 109a1e991dSShuo Chen 119a1e991dSShuo Chen#include <boost/function.hpp> 129a1e991dSShuo Chen#include <boost/shared_ptr.hpp> 139a1e991dSShuo Chen 149a1e991dSShuo Chen#include "datetime/Timestamp.h" 159a1e991dSShuo Chen 169a1e991dSShuo Chennamespace muduo 179a1e991dSShuo Chen{ 189a1e991dSShuo Chen 199a1e991dSShuo Chen// All client visible callbacks go here. 209a1e991dSShuo Chen 21e54e5389SShuo Chenclass TcpConnection; 22e54e5389SShuo Chentypedef boost::shared_ptr<TcpConnection> TcpConnectionPtr; 23e54e5389SShuo Chen 249a1e991dSShuo Chentypedef boost::function<void()> TimerCallback; 25e54e5389SShuo Chentypedef boost::function<void (const TcpConnectionPtr&)> ConnectionCallback; 26e54e5389SShuo Chentypedef boost::function<void (const TcpConnectionPtr&, 27e54e5389SShuo Chen const char* data, 28e54e5389SShuo Chen ssize_t len)> MessageCallback; 299a1e991dSShuo Chen 309a1e991dSShuo Chen} 319a1e991dSShuo Chen 329a1e991dSShuo Chen#endif // MUDUO_NET_CALLBACKS_H 33