1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
/*
Copyright (C) 2002 Hayato Fujiwara <h_fujiwara@users.sourceforge.net>
Copyright (C) 2010-2018 Olaf Till <i7tiol@t-online.de>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; If not, see <http://www.gnu.org/licenses/>.
*/
// PKG_ADD: autoload ("sclose", "parallel_interface.oct");
// PKG_DEL: autoload ("sclose", "parallel_interface.oct", "remove");
#include "parallel-gnutls.h"
DEFUN_DLD (sclose, args, ,
"-*- texinfo -*-\n\
@deftypefn {Loadable Function} {} sclose (@var{connections})\n\
Close the parallel cluster network to which @var{connections} belongs.\n\
\n\
See @code{pconnect} for a description of the @var{connections}\n\
variable. All connections of the network are closed, even if\n\
@var{connections} contains only a subnet or a single connection.\n\
\n\
@xseealso{pconnect, pserver, reval, psend, precv, parallel_generate_srp_data, select_sockets}\n\
@end deftypefn")
{
std::string fname ("sclose");
octave_value retval;
if (args.length () != 1 ||
args(0).type_id () != octave_parallel_connections::static_type_id ())
{
print_usage ();
return retval;
}
const octave_base_value &rep = args(0).get_rep ();
const octave_parallel_connections &cconns =
dynamic_cast<const octave_parallel_connections&> (rep);
octave_parallel_connections_rep *conns = cconns.get_rep ();
inthandler_dont_restart_syscalls __inthandler_guard__;
conns->close ();
return retval;
}
/*
;;; Local Variables: ***
;;; mode: C++ ***
;;; End: ***
*/
|