2
/******************************************************************************
3
* MODULE : socket_link.cpp
4
* DESCRIPTION: TeXmacs links by sockets
5
* COPYRIGHT : (C) 2000 Joris van der Hoeven
6
*******************************************************************************
7
* This software falls under the GNU general public license and comes WITHOUT
8
* ANY WARRANTY WHATSOEVER. See the file $TEXMACS_PATH/LICENSE for more details.
9
* If you don't have this file, write to the Free Software Foundation, Inc.,
10
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
11
******************************************************************************/
15
#include "tm_link.hpp"
17
/******************************************************************************
18
* The socket_link class
19
******************************************************************************/
21
struct socket_link_rep: tm_link_rep {
22
string host; // host for the socket
23
int port; // port for the socket
24
int io; // file descriptor for data going to the child
25
string outbuf; // pending output from plugin
28
socket_link_rep (string host, int port);
32
void write (string s, int channel);
33
string read (int channel);
34
void listen (int msecs);
38
void feed (int channel);
41
void listen_to_sockets ();
42
void close_all_sockets ();
44
#endif // SOCKET_LINK_H