Back to index

texmacs  1.0.7.15
Functions | Variables
texmacs_client.cpp File Reference
#include "client_server.hpp"
#include "socket_server.hpp"
#include "socket_link.hpp"
#include "scheme.hpp"

Go to the source code of this file.

Functions

void client_start (string host)
void client_stop ()
string client_read ()
void client_write (string s)
void enter_secure_mode ()

Variables

static socket_link_repthe_client = NULL

Function Documentation

Definition at line 43 of file texmacs_client.cpp.

               {
  if (the_client == NULL || !the_client->alive) return "";
  if (!the_client->complete_packet (LINK_OUT)) return "";
  bool success;
  string back= the_client->read_packet (LINK_OUT, 0, success);
  //cout << "Server read " << back << "\n";
  return back;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void client_start ( string  host)

Definition at line 24 of file texmacs_client.cpp.

                           {
  if (the_client == NULL) {
    (void) eval ("(use-modules (remote texmacs-client))");
    the_client= tm_new<socket_link_rep> (host, 6561, SOCKET_CLIENT, -1);
  }
  if (!the_client->alive)
    cout << "TeXmacs] Starting client... " << the_client->start () << "\n";
}

Here is the call graph for this function:

Here is the caller graph for this function:

void client_stop ( )

Definition at line 34 of file texmacs_client.cpp.

               {
  if (the_client != NULL) {
    the_client->stop ();
    tm_delete (the_client);
    the_client= NULL;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void client_write ( string  s)

Definition at line 53 of file texmacs_client.cpp.

                        {
  if (the_client == NULL || !the_client->alive) return;
  //cout << "Client write " << s << "\n";
  the_client->write_packet (s, LINK_IN);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 60 of file texmacs_client.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

socket_link_rep* the_client = NULL [static]

Definition at line 17 of file texmacs_client.cpp.