~ubuntu-branches/ubuntu/saucy/drizzle/saucy-proposed

« back to all changes in this revision

Viewing changes to drizzled/plugin/listen_tcp.h

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2012-06-19 10:46:49 UTC
  • mfrom: (1.1.6)
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20120619104649-e2l0ggd4oz3um0f4
Tags: upstream-7.1.36-stable
ImportĀ upstreamĀ versionĀ 7.1.36-stable

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#pragma once
21
21
 
22
22
#include <drizzled/plugin/listen.h>
23
 
 
24
23
#include <netinet/in.h>
25
 
 
26
24
#include <drizzled/visibility.h>
27
25
 
28
 
namespace drizzled
29
 
{
30
 
namespace plugin
31
 
{
 
26
namespace drizzled {
 
27
namespace plugin {
32
28
 
33
29
/**
34
30
 * This class is used by client plugins to provide and manage TCP listening
36
32
 */
37
33
class DRIZZLED_API ListenTcp : public Listen
38
34
{
39
 
  ListenTcp();
40
 
  ListenTcp(const ListenTcp&);
41
 
  ListenTcp& operator=(const ListenTcp&);
42
35
protected:
43
36
  /** Count of errors encountered in acceptTcp. */
44
37
  uint32_t accept_error_count;
57
50
      accept_error_count(0)
58
51
  {}
59
52
 
60
 
  virtual ~ListenTcp() {}
61
 
 
62
53
  /**
63
54
   * This will bind the port to the host interfaces.
64
55
   * @fds[out] Vector of file descriptors that were bound.
65
56
   * @retval true on failure, false on success.
66
57
   */
67
 
  virtual bool getFileDescriptors(std::vector<int> &fds);
 
58
  virtual bool getFileDescriptors(std::vector<int>&);
68
59
 
69
60
  /**
70
61
   * Get the host address to bind to.
71
62
   * @retval The host address.
72
63
   */
73
 
  virtual const std::string getHost(void) const;
 
64
  virtual const std::string getHost() const;
74
65
 
75
66
  /**
76
67
   * Get the port to bind to.
77
68
   * @retval The port number.
78
69
   */
79
 
  virtual in_port_t getPort(void) const= 0;
 
70
  virtual in_port_t getPort() const= 0;
80
71
};
81
72
 
82
73
} /* end namespace plugin */