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