Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

shevek_socket(3) [debian man page]

shevek::socket(3)					     Library Functions Manual						 shevek::socket(3)

NAME
shevek::socket - Use a unix-domain, tcp or avahi network connection with shevek::fd. SYNOPSIS
#include <socket.hh> Inherits shevek::fd. Inherited by shevek::telnet. Public Types typedef sigc::signal0< void > disconnect_t Disconnect signal type. typedef sigc::slot0< void > listen_t New connection callback type. Public Member Functions void listen_unix (std::string const &file, listen_t cb, unsigned queue=10) Listen for new connections on a UNIX socket. Use listen instead. void listen_tcp (std::string const &service, listen_t cb, unsigned queue=10) Listen for new connections on a TCP socket. Use listen instead. void listen_avahi (std::string const &service, Glib::ustring const &protocol, Glib::ustring const &name, listen_t cb, unsigned queue=10) Listen for new connections on a TCP socket, and register it with avahi. Use listen instead. void listen (std::string const &port, listen_t cb, unsigned queue=10) Listen for new connections. void connect_unix (std::string const &unix_name) Connect to a UNIX socket. Use connect instead. void connect_tcp (std::string const &host, std::string const &service) Connect to a TCP socket. Use connect instead. void connect_avahi (avahi::browser::owner const &target, avahi::browser::details const &details=avahi::browser::details()) Connect to an avahi TCP socket. Use connect instead. void connect (std::string const &port) Connect to a socket. void accept (Glib::RefPtr< socket > sock) Accept a connection (only allowed on a listening socket). std::string get_peer_info (bool numeric=false) const Get information about the other side of a connection. std::string get_own_info (bool numeric=false) const Get info about our side of the connection. disconnect_t signal_disconnect () Schedule a function to be called when the socket is disconnected. void disconnect () Disconnect the socket without reconnecting. Static Public Member Functions static Glib::RefPtr< socket > create (Glib::RefPtr< Glib::MainContext > main=Glib::MainContext::get_default()) Create a new socket. Protected Member Functions socket (Glib::RefPtr< Glib::MainContext > main) Constructor. virtual ~socket () Destructor. Detailed Description Use a unix-domain, tcp or avahi network connection with shevek::fd. Member Function Documentation void shevek::socket::connect (std::string const &port) Connect to a socket. This is the preferred function to use. Format: UNIX domain sockets: anything with at least one / in it. TCP: hostname:port, where the hostname and colon may be omitted, and the port may be a service or number. Avahi: name|protocol, where name is the application name, and protocol the connection type. void shevek::socket::listen (std::string const &port, listen_tcb, unsignedqueue = 10) Listen for new connections. This is the preferred function to use. Format: UNIX domain sockets: anything with at least one / in it. TCP services: the name. TCP port numbers: the number. For TCP, appending |name|protocol, where name is the application name and protocol the connection type. Author Generated automatically by Doxygen for libshevek from the source code. libshevek Fri May 11 2012 shevek::socket(3)

Check Out this Related Man Page

shevek::process(3)					     Library Functions Manual						shevek::process(3)

NAME
shevek::process - Create a process, optionally connection its standard in- and output streams to the calling program. SYNOPSIS
#include <process.hh> Inherits shevek::refbase. Public Member Functions Glib::RefPtr< shevek::fd > in () The standard input pipe, if it was requested. Glib::RefPtr< shevek::fd > out () The standard output pipe, if it was requested. Glib::RefPtr< shevek::fd > err () The standard error pipe, if it was requested. pid_t pid () The process ID. ~process () The destructor. This kills the process if it was still running. Static Public Member Functions static Glib::RefPtr< process > create (std::string const &command, std::list< std::string > &argv, bool pipe_stdin=true, bool pipe_stdout=true, bool pipe_stderr=true) Create a process from a filename and an argument list. static Glib::RefPtr< process > create (std::string const &command, std::list< std::string > &argv, std::list< std::string > const &envp, bool pipe_stdin=true, bool pipe_stdout=true, bool pipe_stderr=true) Create a process from a filename, an argument list and an environment. static Glib::RefPtr< process > shell (std::string const &command, bool pipe_stdin=true, bool pipe_stdout=true, bool pipe_stderr=true, std::string const &sh='/bin/sh') Run a string with the shell. static std::string run (std::string const &command, std::string const &sh) Run a process and return its output. static Glib::RefPtr< process > create (std::string const &command, bool pipe_stdin=true, bool pipe_stdout=true, bool pipe_stderr=true) Create a process without arguments. static Glib::RefPtr< process > create (std::string const &command, std::string const &a1, bool pipe_stdin=true, bool pipe_stdout=true, bool pipe_stderr=true) Create a process with one argument. static Glib::RefPtr< process > create (std::string const &command, std::string const &a1, std::string const &a2, bool pipe_stdin=true, bool pipe_stdout=true, bool pipe_stderr=true) Create a process with two arguments. static Glib::RefPtr< process > create (std::string const &command, std::string const &a1, std::string const &a2, std::string const &a3, bool pipe_stdin=true, bool pipe_stdout=true, bool pipe_stderr=true) Create a process with three arguments. static Glib::RefPtr< process > create (std::string const &command, std::string const &a1, std::string const &a2, std::string const &a3, std::string const &a4, bool pipe_stdin=true, bool pipe_stdout=true, bool pipe_stderr=true) Create a process with four arguments. static Glib::RefPtr< process > create (std::string const &command, std::string const &a1, std::string const &a2, std::string const &a3, std::string const &a4, std::string const &a5, bool pipe_stdin=true, bool pipe_stdout=true, bool pipe_stderr=true) Create a process with five arguments. static Glib::RefPtr< process > create (std::string const &command, std::string const &a1, std::string const &a2, std::string const &a3, std::string const &a4, std::string const &a5, std::string const &a6, bool pipe_stdin=true, bool pipe_stdout=true, bool pipe_stderr=true) Create a process with six arguments. static Glib::RefPtr< process > create (std::string const &command, std::string const &a1, std::string const &a2, std::string const &a3, std::string const &a4, std::string const &a5, std::string const &a6, std::string const &a7, bool pipe_stdin=true, bool pipe_stdout=true, bool pipe_stderr=true) Create a process with seven arguments. static Glib::RefPtr< process > create (std::string const &command, std::string const &a1, std::string const &a2, std::string const &a3, std::string const &a4, std::string const &a5, std::string const &a6, std::string const &a7, std::string const &a8, bool pipe_stdin=true, bool pipe_stdout=true, bool pipe_stderr=true) Create a process with eight arguments. static Glib::RefPtr< process > create (std::string const &command, std::string const &a1, std::string const &a2, std::string const &a3, std::string const &a4, std::string const &a5, std::string const &a6, std::string const &a7, std::string const &a8, std::string const &a9, bool pipe_stdin=true, bool pipe_stdout=true, bool pipe_stderr=true) Create a process with nine arguments. Detailed Description Create a process, optionally connection its standard in- and output streams to the calling program. Member Function Documentation static std::string shevek::process::run (std::string const &command, std::string const &sh) [static] Run a process and return its output. A convenience function for running a process and catching its standard output in a string. This blocks until the process has exited. static Glib::RefPtr<process> shevek::process::shell (std::string const &command, boolpipe_stdin = true, boolpipe_stdout = true, boolpipe_stderr = true, std::string const &sh = '/bin/sh') [inline, static] Run a string with the shell. Note that the process is forked from the shell, and so does not get killed when the process goes away. Author Generated automatically by Doxygen for libshevek from the source code. libshevek Fri May 11 2012 shevek::process(3)
Man Page