include
simple_message
socket
tcp_client.h
Go to the documentation of this file.
1
/*
2
* Software License Agreement (BSD License)
3
*
4
* Copyright (c) 2011, Southwest Research Institute
5
* Copyright (c) 2019, READY Robotics Corporation
6
* All rights reserved.
7
*
8
* Redistribution and use in source and binary forms, with or without
9
* modification, are permitted provided that the following conditions are met:
10
*
11
* * Redistributions of source code must retain the above copyright
12
* notice, this list of conditions and the following disclaimer.
13
* * Redistributions in binary form must reproduce the above copyright
14
* notice, this list of conditions and the following disclaimer in the
15
* documentation and/or other materials provided with the distribution.
16
* * Neither the name of the Southwest Research Institute, nor the names
17
* of its contributors may be used to endorse or promote products derived
18
* from this software without specific prior written permission.
19
*
20
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
24
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30
* POSSIBILITY OF SUCH DAMAGE.
31
*/
32
33
#ifndef TCP_CLIENT_H
34
#define TCP_CLIENT_H
35
36
#ifndef FLATHEADERS
37
#include "
simple_message/socket/tcp_socket.h
"
38
#else
39
#include "
tcp_socket.h
"
40
#endif
41
42
43
namespace
industrial
44
{
45
namespace
tcp_client
46
{
47
48
52
class
TcpClient
:
public
industrial::tcp_socket::TcpSocket
53
{
54
public
:
55
59
TcpClient
();
60
64
~TcpClient
();
65
75
bool
init
(
char
*buff,
int
port_num);
76
77
// Overrides
78
bool
makeConnect
();
79
80
private
:
81
bool
connectSocketHandle
();
82
83
84
};
85
86
}
//tcp_client
87
}
//industrial
88
89
#endif
/* TCP_CLIENT_H */
industrial::tcp_client::TcpClient::init
bool init(char *buff, int port_num)
initializes TCP client socket. Object can either be a client OR a server, NOT BOTH.
Definition:
tcp_client.cpp:55
industrial::tcp_client::TcpClient::connectSocketHandle
bool connectSocketHandle()
Definition:
tcp_client.cpp:118
industrial
Definition:
byte_array.h:45
industrial::tcp_client::TcpClient::TcpClient
TcpClient()
Constructor.
Definition:
tcp_client.cpp:45
industrial::tcp_client::TcpClient::~TcpClient
~TcpClient()
Destructor.
Definition:
tcp_client.cpp:50
industrial::tcp_socket::TcpSocket
Definition:
tcp_socket.h:66
industrial::tcp_client::TcpClient::makeConnect
bool makeConnect()
connects to the remote host
Definition:
tcp_client.cpp:91
tcp_socket.h
industrial::tcp_client::TcpClient
Defines TCP client functions.
Definition:
tcp_client.h:52
simple_message
Author(s): Shaun Edwards
autogenerated on Mon Feb 28 2022 22:34:36