Enable NODELAY for TCP connections
[bcusdk.git] / eibd / libserver / server.h
blob16f27333f298a2b72f2d81703074683a16b91322
1 /*
2 EIBD eib bus access and management daemon
3 Copyright (C) 2005-2007 Martin Koegler <mkoegler@auto.tuwien.ac.at>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 #ifndef SERVER_H
21 #define SERVER_H
23 #include "common.h"
24 #include "layer3.h"
26 class ClientConnection;
27 /** implements the frontend (but opens no connection) */
28 class Server:protected Thread
30 /** Layer 3 interface */
31 Layer3 *l3;
32 /** open client connections*/
33 Array < ClientConnection * >connections;
35 void Run (pth_sem_t * stop);
36 protected:
37 /** debug output */
38 Trace * t;
39 /** server socket */
40 int fd;
42 virtual void setupConnection (int cfd);
44 Server (Layer3 * l3, Trace * tr);
45 public:
46 virtual ~ Server ();
47 /** deregister client connection */
48 bool deregister (ClientConnection * con);
51 #endif