/*
 * (C) 2007-2010 Taobao Inc.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 *
 * Version: $Id$
 *
 * Authors:
 *   duolong <duolong@taobao.com>
 *
 */

#ifndef TBNET_SERVERSOCKET_H_
#define TBNET_SERVERSOCKET_H_

namespace tbnet {

class ServerSocket : public Socket {

 public:
  /*
   * ¹¹Ôìº¯Êý
   */
  ServerSocket();
  /*
   * acceptÒ»¸öÐÂµÄÁ¬½Ó
   *
   * @return Ò»¸öSocket
   */
  Socket* accept();

  /*
   * ´ò¿ª¼àÌý
   *
   * @return ÊÇ·ñ³É¹¦
   */
  bool listen();

 private:
  int _backLog; // backlog
};

}

#endif /*SERVERSOCKET_H_*/
