Design Patterns
tcp_connection.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_CONNECTION_H_
7 #define OPERATIONAL_STATE_TCP_CONNECTION_H_
8 
9 #include "tcp_octet_stream.h"
10 
11 #include <string>
12 
13 namespace operational
14 {
15 namespace state
16 {
18 {
19  public:
20  TcpConnection();
21 
23 
24  void ActiveOpen();
25  void PassiveOpen();
26  void Close();
27 
28  void Send();
29  void Acknowledge();
30  void Synchronize();
31 
33 
34  std::string Info() const;
35 
36  private:
37  friend class TcpState;
38  void ChangeState(TcpState*);
39 
40  TcpState* state_;
41 };
42 }
43 }
44 
45 #endif
46 
static TcpConnection * CreateConnection()
Definition: tcp_connection.cc:17
void ProcessOctet(TcpOctetStream *)
Definition: tcp_connection.cc:68
void Synchronize()
Definition: tcp_connection.cc:63
Definition: application.cc:10
void PassiveOpen()
Definition: tcp_connection.cc:43
Definition: tcp_octet_stream.h:13
TcpConnection()
Definition: tcp_connection.cc:15
Definition: tcp_state.h:15
void Send()
Definition: tcp_connection.cc:53
std::string Info() const
Definition: tcp_connection.cc:73
void Acknowledge()
Definition: tcp_connection.cc:58
void ActiveOpen()
Definition: tcp_connection.cc:38
Definition: tcp_connection.h:17
void Close()
Definition: tcp_connection.cc:48