12a18e699SShuo Chen// excerpts from http://code.google.com/p/muduo/ 22a18e699SShuo Chen// 32a18e699SShuo Chen// Use of this source code is governed by a BSD-style license 42a18e699SShuo Chen// that can be found in the License file. 52a18e699SShuo Chen// 62a18e699SShuo Chen// Author: Shuo Chen (chenshuo at chenshuo dot com) 72a18e699SShuo Chen 82a18e699SShuo Chen#ifndef MUDUO_NET_CALLBACKS_H 92a18e699SShuo Chen#define MUDUO_NET_CALLBACKS_H 102a18e699SShuo Chen 112a18e699SShuo Chen#include <boost/function.hpp> 122a18e699SShuo Chen#include <boost/shared_ptr.hpp> 132a18e699SShuo Chen 142a18e699SShuo Chen#include "datetime/Timestamp.h" 152a18e699SShuo Chen 162a18e699SShuo Chennamespace muduo 172a18e699SShuo Chen{ 182a18e699SShuo Chen 192a18e699SShuo Chen// All client visible callbacks go here. 202a18e699SShuo Chen 212a18e699SShuo Chenclass Buffer; 222a18e699SShuo Chenclass TcpConnection; 232a18e699SShuo Chentypedef boost::shared_ptr<TcpConnection> TcpConnectionPtr; 242a18e699SShuo Chen 252a18e699SShuo Chentypedef boost::function<void()> TimerCallback; 262a18e699SShuo Chentypedef boost::function<void (const TcpConnectionPtr&)> ConnectionCallback; 272a18e699SShuo Chentypedef boost::function<void (const TcpConnectionPtr&, 282a18e699SShuo Chen Buffer* buf, 292a18e699SShuo Chen Timestamp)> MessageCallback; 302a18e699SShuo Chentypedef boost::function<void (const TcpConnectionPtr&)> CloseCallback; 312a18e699SShuo Chen 322a18e699SShuo Chen} 332a18e699SShuo Chen 342a18e699SShuo Chen#endif // MUDUO_NET_CALLBACKS_H 35