Design Patterns
tcp_listen.h
Go to the documentation of this file.
1 // Based on "Design Patterns: Elements of Reusable Object-Oriented Software"
2 // book by Erich Gamma, John Vlissides, Ralph Johnson, and Richard Helm
3 //
4 // Created by Bartosz Rachwal. The National Institute of Advanced Industrial Science and Technology, Japan.
5 
6 #ifndef OPERATIONAL_STATE_TCP_LISTEN_H_
7 #define OPERATIONAL_STATE_TCP_LISTEN_H_
8 
9 #include "tcp_state.h"
10 
11 namespace operational
12 {
13 namespace state
14 {
15 class TcpListen : public TcpState
16 {
17  public:
18  TcpListen();
19 
20  void Initialize(TcpState* established, TcpState* closed);
21 
22  virtual void Close(TcpConnection*) override;
23  virtual void Send(TcpConnection*) override;
24 
25  virtual std::string Info() const override;
26 
27  private:
28  TcpState* established_;
29  TcpState* closed_;
30 };
31 }
32 }
33 
34 #endif
35 
Definition: tcp_listen.h:15
Definition: application.cc:10
Definition: tcp_state.h:15
virtual void Close(TcpConnection *) override
Definition: tcp_listen.cc:20
TcpListen()
Definition: tcp_listen.cc:12
void Initialize(TcpState *established, TcpState *closed)
Definition: tcp_listen.cc:14
virtual std::string Info() const override
Definition: tcp_listen.cc:31
virtual void Send(TcpConnection *) override
Definition: tcp_listen.cc:25
Definition: tcp_connection.h:17