Back to index

texmacs  1.0.7.15
Functions
client_server.hpp File Reference
#include "string.hpp"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void server_start ()
void server_stop ()
string server_read (int fd)
void server_write (int fd, string s)
void client_start (string host)
void client_stop ()
string client_read ()
void client_write (string s)
void enter_secure_mode ()

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:

string server_read ( int  fd)

Definition at line 42 of file texmacs_server.cpp.

                     {
  tm_link ln= find_socket_link (fd);
  if (is_nil (ln)) return "";
  if (!ln->complete_packet (LINK_OUT)) return "";
  bool success;
  string back= ln->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 server_start ( )

Definition at line 24 of file texmacs_server.cpp.

                {
  if (the_server == NULL) {
    (void) eval ("(use-modules (remote texmacs-server))");
    the_server= tm_new<socket_server_rep> (6561);
  }
  if (!the_server->alive)
    cout << "TeXmacs] Starting server... " << the_server->start () << "\n";
}

Here is the call graph for this function:

Here is the caller graph for this function:

void server_stop ( )

Definition at line 34 of file texmacs_server.cpp.

               {
  if (the_server != NULL) {
    tm_delete (the_server);
    the_server= NULL;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void server_write ( int  fd,
string  s 
)

Definition at line 53 of file texmacs_server.cpp.

                                {
  tm_link ln= find_socket_link (fd);
  if (is_nil (ln)) return;
  //cout << "Server write " << s << "\n";
  ln->write_packet (s, LINK_IN);
}

Here is the call graph for this function:

Here is the caller graph for this function: