Instrument Neutral Distributed Interface INDI
2.2.5
integs
ServerMock.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
#ifndef SERVER_MOCK_H_
20
#define SERVER_MOCK_H_ 1
21
22
#include <string>
23
#include <unistd.h>
24
25
class
IndiClientMock
;
26
30
class
ServerMock
31
{
32
int
fd;
33
34
public
:
35
ServerMock
();
36
virtual
~ServerMock
();
37
38
// Start the listening socket that will receive driver upon their starts
39
void
listen
(
int
tcpPort
);
40
void
listen
(
const
std::string &unixPath);
41
42
void
accept
(
IndiClientMock
&into);
43
44
// TCP port of the listening socket (useful when listening on port 0)
45
int
tcpPort
()
const
;
46
47
void
close
();
48
};
49
50
51
#endif
// SERVER_MOCK_H_
IndiClientMock
Definition
IndiClientMock.h:32
ServerMock
Definition
ServerMock.h:31
ServerMock::listen
void listen(int tcpPort)
Definition
ServerMock.cpp:48
ServerMock::~ServerMock
virtual ~ServerMock()
Definition
ServerMock.cpp:32
ServerMock::close
void close()
Definition
ServerMock.cpp:37
ServerMock::accept
void accept(IndiClientMock &into)
Definition
ServerMock.cpp:65
ServerMock::ServerMock
ServerMock()
Definition
ServerMock.cpp:27
ServerMock::tcpPort
int tcpPort() const
Definition
ServerMock.cpp:60
Generated on Thu Oct 22 2026 14:46:48 for Instrument Neutral Distributed Interface INDI by
1.9.8