⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unixsocket.h

📁 LINUX下发送邮件的库,测试很好用,有各种发送测试的例子
💻 H
字号:
/************************************************************************* *                                                                       * * 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 2 of the License, or     * * (at your option) any later version.                                   * *                                                                       * *************************************************************************/#ifndef _UNIXSOCKET_H__#define _UNIXSOCKET_H__#include "global.h"#include "exception.h"#include "logger.h"#include "i18n.h"#include "sslsocket.h"#include <unistd.h>#include <arpa/inet.h>#include <netdb.h>#include <sys/socket.h>#include <netinet/in.h>#include <errno.h>#include <string>using namespace std;/** * This class describes a unix socket that is connected to  * another process. * * @author Timo Benk <t_benk@web.de> */class UnixSocket : public SSLSocket{	public:		/**		 * Constructor.		 *		 * @param argv The program that is to be started, including cmdline		 *             arguments.		 */		UnixSocket (const vector<string> &argv);		/**		 * Constructor.		 *		 * @param argv The program that is to be started, including cmdline		 *             arguments.		 * @param fd   The file descriptor this socket uses for IO.		 */		UnixSocket (int fd, const vector<string> &argv);		/**		 * Destructor.		 */		~UnixSocket ();		/**		 * Open the socket.		 *		 * @throws TransferException		 *                    If the connection to the host cannot be		 *                    established.		 */		void connect ();	protected:		/**		 * The argv array for the process that is to be started.		 */		char ** argv;		/**		 * Build the argv array.		 *		 * @param argv The program that is to be started, including cmdline		 *             arguments.		 */		void buildArgv (const vector<string> &argv);};#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -