startSocketServer          package:svSocket          R Documentation

_S_t_a_r_t _a_n_d _s_t_o_p _a _R _s_o_c_k_e_t _s_e_r_v_e_r.

_D_e_s_c_r_i_p_t_i_o_n:

     A R socket server is listening for command send by clients to a
     TCP port. This server is implemented in Tcl/Tk, using the powerful
     'socket' command. Since it runs in the separate tcltk event loop,
     it is not blocking R, and it runs in the background; the user can
     still enter commands at the R prompt while one or several R socket
     servers are running and even, possibly, processing socket clients
     requests.

_U_s_a_g_e:

     startSocketServer(port = 8888, server.name = "Rserver", procfun = processSocket)
     stopSocketServer(port = 8888)

_A_r_g_u_m_e_n_t_s:

    port: The TCP port of the R socket server 

server.name: The internal name of this server 

 procfun: The function to use to process client's commands. By default,
          it is 'processSocket()'. 

_D_e_t_a_i_l_s:

     One can write a different 'procfun' function than the default one
     for special servers. That function must accept one argument (a
     string with the command send by the client) and it must return a
     character string containing the result of the computation.

_N_o_t_e:

     This server is currently synchronous in the processing of the
     command. However, neither R, nor the client are blocked during
     exchange of data (communication is asynchronous).

_A_u_t_h_o_r(_s):

     Philippe Grosjean (phgrosjean@sciviews.org)

_S_e_e _A_l_s_o:

     'processSocket'

_E_x_a_m_p_l_e_s:

     ##TO DO...

