TcpConnection for TCP connections made from TcpProcess's listen() and connect().  
 More...
TcpConnection for TCP connections made from TcpProcess's listen() and connect(). 
 
◆ accept()
      
        
          | void TcpConnection::accept  | 
          ( | 
          bool  | 
           | ) | 
           | 
        
      
 
Accept the connection request. 
- Parameters
 - 
  
    | bAccepted,bool- | true to accept and false to reject  | 
  
   
 
 
◆ close()
Close the current connection. 
- Parameters
 - 
  
  
 
 
 
◆ getLocalIp()
      
        
          | ip TcpConnection::getLocalIp  | 
          ( | 
           | ) | 
           | 
        
      
 
Get local Ip Address. 
- Returns
 - ip, local ip address 
 
 
 
◆ getLocalIpv6()
      
        
          | ipv6 TcpConnection::getLocalIpv6  | 
          ( | 
           | ) | 
           | 
        
      
 
Get local Ipv6 Address. 
- Returns
 - ipv6, local ipv6 address 
 
 
 
◆ getLocalPort()
      
        
          | int TcpConnection::getLocalPort  | 
          ( | 
           | ) | 
           | 
        
      
 
Get local Port number. 
- Returns
 - int, port number 
 
 
 
◆ getRemoteIp()
      
        
          | ip TcpConnection::getRemoteIp  | 
          ( | 
           | ) | 
           | 
        
      
 
Get remote Ip Address. 
- Returns
 - ip, remote ip address 
 
 
 
◆ getRemoteIpString()
      
        
          | string TcpConnection::getRemoteIpString  | 
          ( | 
           | ) | 
           | 
        
      
 
Get remote ip address in string format. 
- Returns
 - string, remote ip address 
 
 
 
◆ getRemoteIpv6()
      
        
          | ipv6 TcpConnection::getRemoteIpv6  | 
          ( | 
           | ) | 
           | 
        
      
 
Get remote Ipv6 Address. 
- Returns
 - ipv6, remote ipv6 address 
 
 
 
◆ getRemotePort()
      
        
          | int TcpConnection::getRemotePort  | 
          ( | 
           | ) | 
           | 
        
      
 
Get remote port number. 
- Returns
 - int, remote port number 
 
 
 
◆ getState()
      
        
          | TcpConnectionState TcpConnection::getState  | 
          ( | 
           | ) | 
           | 
        
      
 
get the tcp connection state 
- Returns
 - enum<TcpConnectionState> CLOSED = 0, // Server received ACK from client and connection is closed. SYN_SENT = 1, // Indicates active open. SYN_RECEIVED = 2, // Server just received SYN from the client. ESTABLISHED = 3, // Client received server's SYN and session is established. LISTEN = 4, // Server is ready to accept connection. FIN_WAIT_1 = 5, // Indicates active close. TIMED_WAIT = 6, // Client enters this state after active close. CLOSE_WAIT = 7, // Indicates passive close. Server just received first FIN from a client. FIN_WAIT_2 = 8, // Client just received acknowledgment of its first FIN from the server. LAST_ACK = 9, // Server is in this state when it sends its own FIN. CLOSING = 10 
  
 
 
◆ sendData()
Sends data over this custom TCP process. 
- Parameters
 - 
  
    | data,the | data to send to the destination.  | 
    | frameInstance,the | FrameInstance object. Use createFrameInstance() to create the FrameInstance object. | 
  
   
- Returns
 - bool, true if successful, otherwise false. 
 
 
 
◆ sendDataWithPduInfo()
      
        
          | bool TcpConnection::sendDataWithPduInfo  | 
          ( | 
          QString  | 
          ,  | 
        
        
           | 
           | 
          FrameInstance  | 
          ,  | 
        
        
           | 
           | 
          QString  | 
          ,  | 
        
        
           | 
           | 
          QString  | 
          ,  | 
        
        
           | 
           | 
          QString  | 
            | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Sends data over this custom TCP process. 
- Parameters
 - 
  
    | data,the | data to send to the destination.  | 
    | frameInstance,the | FrameInstance object. Use createFrameInstance() to create the FrameInstance object.  | 
    | customProtocol,the | custom protocol name  | 
    | customPduType,the | custom PDU type  | 
    | jsonFields,the | fields in JSON string representation: | 
  
   
- Returns
 - bool, true if successful, otherwise false. 
 
 
 
The documentation for this class was generated from the following file: