Instrument Neutral Distributed Interface INDI  2.0.2
utils.h
Go to the documentation of this file.
1 /*******************************************************************************
2  Copyright(c) 2022 Ludovic Pollet. All rights reserved.
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License version 2 as published by the Free Software Foundation.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Library General Public License for more details.
12 
13  You should have received a copy of the GNU Library General Public License
14  along with this library; see the file COPYING.LIB. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17 *******************************************************************************/
18 
19 #include <string>
20 
21 void setupSigPipe();
22 
23 int unixSocketListen(const std::string &path);
24 int unixSocketConnect(const std::string &unixAddr, bool failAllowed = false);
25 void unixSocketSendFds(int fd, int count, int * fds);
26 void unixSocketRecvFds(int fd, int count, int * fds);
27 
28 int tcpSocketListen(int port);
29 int tcpSocketConnect(const std::string &unixAddr, int port, bool failAllowed = false);
30 
31 int socketAccept(int fd);
32 
33 std::string getTestExePath(const std::string &basename);
int fd
Definition: intelliscope.c:43
int unixSocketListen(const std::string &path)
Definition: utils.cpp:71
int socketAccept(int fd)
Definition: utils.cpp:144
int unixSocketConnect(const std::string &unixAddr, bool failAllowed=false)
Definition: utils.cpp:155
int tcpSocketListen(int port)
Definition: utils.cpp:108
int tcpSocketConnect(const std::string &unixAddr, int port, bool failAllowed=false)
Definition: utils.cpp:301
void unixSocketRecvFds(int fd, int count, int *fds)
Definition: utils.cpp:228
std::string getTestExePath(const std::string &basename)
Definition: utils.cpp:340
void unixSocketSendFds(int fd, int count, int *fds)
Definition: utils.cpp:183
void setupSigPipe()
Definition: utils.cpp:37