165c497a3SShuo Chen// excerpts from http://code.google.com/p/muduo/ 265c497a3SShuo Chen// 365c497a3SShuo Chen// Use of this source code is governed by a BSD-style license 465c497a3SShuo Chen// that can be found in the License file. 565c497a3SShuo Chen// 665c497a3SShuo Chen// Author: Shuo Chen (chenshuo at chenshuo dot com) 765c497a3SShuo Chen 865c497a3SShuo Chen#ifndef MUDUO_NET_CALLBACKS_H 965c497a3SShuo Chen#define MUDUO_NET_CALLBACKS_H 1065c497a3SShuo Chen 1165c497a3SShuo Chen#include <boost/function.hpp> 1265c497a3SShuo Chen#include <boost/shared_ptr.hpp> 1365c497a3SShuo Chen 1465c497a3SShuo Chen#include "datetime/Timestamp.h" 1565c497a3SShuo Chen 1665c497a3SShuo Chennamespace muduo 1765c497a3SShuo Chen{ 1865c497a3SShuo Chen 1965c497a3SShuo Chen// All client visible callbacks go here. 2065c497a3SShuo Chen 21714cd85fSShuo Chenclass Buffer; 2265c497a3SShuo Chenclass TcpConnection; 2365c497a3SShuo Chentypedef boost::shared_ptr<TcpConnection> TcpConnectionPtr; 2465c497a3SShuo Chen 2565c497a3SShuo Chentypedef boost::function<void()> TimerCallback; 2665c497a3SShuo Chentypedef boost::function<void (const TcpConnectionPtr&)> ConnectionCallback; 2765c497a3SShuo Chentypedef boost::function<void (const TcpConnectionPtr&, 28714cd85fSShuo Chen Buffer* buf, 29714cd85fSShuo Chen Timestamp)> MessageCallback; 3065c497a3SShuo Chentypedef boost::function<void (const TcpConnectionPtr&)> CloseCallback; 3165c497a3SShuo Chen 3265c497a3SShuo Chen} 3365c497a3SShuo Chen 3465c497a3SShuo Chen#endif // MUDUO_NET_CALLBACKS_H 35