Skip to content

Commit

Permalink
Delete FdChannel::close_fn_ and FdChannel::SetCloseCallback
Browse files Browse the repository at this point in the history
  • Loading branch information
zieckey committed Mar 24, 2017
1 parent 4cf3228 commit 98585ce
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 7 deletions.
1 change: 0 additions & 1 deletion evpp/fd_channel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ void FdChannel::Close() {
}
read_fn_ = ReadEventCallback();
write_fn_ = EventCallback();
close_fn_ = EventCallback();
}

void FdChannel::AttachToLoop() {
Expand Down
5 changes: 0 additions & 5 deletions evpp/fd_channel.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,6 @@ class EVPP_EXPORT FdChannel {
write_fn_ = cb;
}

void SetCloseCallback(const EventCallback& cb) {
close_fn_ = cb;
}

private:
void HandleEvent(int fd, short which);
static void HandleEvent(int fd, short which, void* v);
Expand All @@ -85,7 +81,6 @@ class EVPP_EXPORT FdChannel {
private:
ReadEventCallback read_fn_;
EventCallback write_fn_;
EventCallback close_fn_;

EventLoop* loop_;
bool attached_; // A flag indicate whether this FdChannel has been attached to loop_
Expand Down
1 change: 0 additions & 1 deletion evpp/tcp_conn.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ TCPConn::TCPConn(EventLoop* l,
chan_.reset(new FdChannel(l, sockfd, false, false));
chan_->SetReadCallback(std::bind(&TCPConn::HandleRead, this));
chan_->SetWriteCallback(std::bind(&TCPConn::HandleWrite, this));
chan_->SetCloseCallback(std::bind(&TCPConn::HandleClose, this));
}

LOG_DEBUG << "TCPConn::[" << name_ << "] this=" << this << " channel=" << chan_.get() << " fd=" << sockfd;
Expand Down

0 comments on commit 98585ce

Please sign in to comment.