It's not necessary to use EPOLL_CTL_DEL after close()

This commit is contained in:
Ian Gulliver
2015-02-05 20:57:01 +00:00
parent 524434813c
commit c91b64f892
3 changed files with 42 additions and 20 deletions

View File

@@ -9,16 +9,16 @@ class CryptoBase {
static void GenKey(std::string* key);
static void GenKeyPair(std::string* secret_key, std::string* public_key);
virtual int OnReadable() = 0;
virtual void OnReadable() = 0;
protected:
const int fd_;
};
class CryptoPubPeer : public CryptoBase {
class CryptoPubServerConnection : public CryptoBase {
public:
CryptoPubPeer(const int fd, const std::string secret_key);
int OnReadable();
CryptoPubServerConnection(const int fd, const std::string secret_key);
void OnReadable();
private:
const std::string secret_key_;
@@ -29,7 +29,7 @@ class CryptoPubServer : public CryptoBase {
public:
CryptoPubServer(const int fd, const std::string secret_key);
~CryptoPubServer();
int OnReadable();
void OnReadable();
void Loop();
private: