1b37003a7SShuo Chen// excerpts from http://code.google.com/p/muduo/ 2b37003a7SShuo Chen// 3b37003a7SShuo Chen// Use of this source code is governed by a BSD-style license 4b37003a7SShuo Chen// that can be found in the License file. 5b37003a7SShuo Chen// 6b37003a7SShuo Chen// Author: Shuo Chen (chenshuo at chenshuo dot com) 7b37003a7SShuo Chen 8b37003a7SShuo Chen#ifndef MUDUO_NET_CALLBACKS_H 9b37003a7SShuo Chen#define MUDUO_NET_CALLBACKS_H 10b37003a7SShuo Chen 11b37003a7SShuo Chen#include <boost/function.hpp> 12b37003a7SShuo Chen#include <boost/shared_ptr.hpp> 13b37003a7SShuo Chen 14b37003a7SShuo Chen#include "datetime/Timestamp.h" 15b37003a7SShuo Chen 16b37003a7SShuo Chennamespace muduo 17b37003a7SShuo Chen{ 18b37003a7SShuo Chen 19b37003a7SShuo Chen// All client visible callbacks go here. 20b37003a7SShuo Chen 21b37003a7SShuo Chenclass Buffer; 22b37003a7SShuo Chenclass TcpConnection; 23b37003a7SShuo Chentypedef boost::shared_ptr<TcpConnection> TcpConnectionPtr; 24b37003a7SShuo Chen 25b37003a7SShuo Chentypedef boost::function<void()> TimerCallback; 26b37003a7SShuo Chentypedef boost::function<void (const TcpConnectionPtr&)> ConnectionCallback; 27b37003a7SShuo Chentypedef boost::function<void (const TcpConnectionPtr&, 28b37003a7SShuo Chen Buffer* buf, 29b37003a7SShuo Chen Timestamp)> MessageCallback; 3013e937ffSShuo Chentypedef boost::function<void (const TcpConnectionPtr&)> WriteCompleteCallback; 31b37003a7SShuo Chentypedef boost::function<void (const TcpConnectionPtr&)> CloseCallback; 32b37003a7SShuo Chen 33b37003a7SShuo Chen} 34b37003a7SShuo Chen 35b37003a7SShuo Chen#endif // MUDUO_NET_CALLBACKS_H 36