📄 connector.h
字号:
/***************************************************************************//* *//* Copyright (c) 2005, 2006 2X Software Ltd, http://www.2X.com., NoMachine *//* *//* NXCOMP, NX protocol compression and NX extensions to this software *//* are copyright of Nomachine. Redistribution and use of the present *//* software is allowed according to terms specified in the file LICENSE *//* which comes in the source distribution. *//* *//* NX and NoMachine are trademarks of Medialogic S.p.A. *//* *//* 2X is a trademark of 2X Software Ltd. *//* *//* All rights reserved. *//* *//***************************************************************************/#ifndef Connector_H#define Connector_H#include "Timestamp.h"#include "Runnable.h"enum T_connector_type{ connector_none = -1, connector_tcp, connector_unix};class Connector : protected Runnable{ protected: Connector(T_connector_type type); ~Connector(); public: T_connector_type getType() { return type_; } int setHost(const char *host); int setPort(int port); int setDirectory(const char *directory); int setFile(const char *file); int setTimeout(const T_timestamp timeout); const char *getNode() { return node_; } int getFd() { return fd_; } int start(); int end(); protected: int startTcp(); int startUnix(); int makeNode(); private: int fd_; int port_; char *host_; char *directory_; char *file_; char *node_; T_timestamp timeout_; T_connector_type type_;};class UnixConnector : public Connector{ public: UnixConnector() : Connector(connector_unix) { }};class TcpConnector : public Connector{ public: TcpConnector() : Connector(connector_tcp) { }};#endif /* Connector_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -