GNU Radio's DIFI Package
The DIFI Out of Tree (OOT) Module allows users to leverage and easily use cloud resources in GNU Radio.
tcp_server.h
Go to the documentation of this file.
1// -*- c++ -*-
2// Copyright (c) Microsoft Corporation.
3// Licensed under the GNU General Public License v3.0 or later.
4// See License.txt in the project root for license information.
5
6#ifndef INCLUDED_TCP_SERVER_H
7#define INCLUDED_TCP_SERVER_H
8
9#include <string>
10#include <netinet/in.h>
11
12
13namespace gr {
14namespace difi {
15
17{
18 public:
19
20 tcp_server(std::string ip_addr, uint32_t port);
22
24 int read(int8_t* buf, int len);
25
27
28
29 private:
30
31 void check_for_incoming_conn(int timeout_in_ms=100);
32 void reset_client_conn();
33
34 bool is_data_available(int timeout_in_ms=100);
35
36 int d_listener;
37 int d_client;
38 struct sockaddr_in d_servaddr;
39};
40
41} // namespace difi
42} // namespace gr
43
44#endif /* INCLUDED_TCP_SERVER_H */
tcp_server(std::string ip_addr, uint32_t port)
int read(int8_t *buf, int len)
Definition difi_common.h:14
Definition difi_common.h:13