diff options
author | Peter Powell <petpow@saberuk.com> | 2019-07-21 16:56:55 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2019-07-21 16:57:19 +0100 |
commit | 5f387071d339892ebed5accba92f91f997396476 (patch) | |
tree | c91e7f11859dc267b8c2b946f159abe28d558038 /src/socketengine.cpp | |
parent | 62f6e56e158a3c147cd1395dab790f918ce2d1b4 (diff) |
Add a method for swapping user I/O handlers.
Diffstat (limited to 'src/socketengine.cpp')
-rw-r--r-- | src/socketengine.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/socketengine.cpp b/src/socketengine.cpp index df6ff5a02..f447fded8 100644 --- a/src/socketengine.cpp +++ b/src/socketengine.cpp @@ -50,6 +50,12 @@ EventHandler::EventHandler() event_mask = 0; } +void EventHandler::SwapInternals(EventHandler& other) +{ + std::swap(fd, other.fd); + std::swap(event_mask, other.event_mask); +} + void EventHandler::SetFd(int FD) { this->fd = FD; |