summaryrefslogtreecommitdiffstats
path: root/net/curvecp/server_messenger.cc
blob: 53bad71c3dec8601d8146b9b35cc86f8b005002a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "net/curvecp/server_messenger.h"

namespace net {

ServerMessenger::ServerMessenger(Packetizer* packetizer,
                                 Acceptor* acceptor)
    : Messenger(packetizer),
      acceptor_(acceptor) {
  DCHECK(acceptor_);
}

ServerMessenger::ServerMessenger(ConnectionKey key,
                                 Packetizer* packetizer,
                                 Acceptor* acceptor)
    : Messenger(packetizer),
      acceptor_(acceptor) {
  DCHECK(acceptor_);
  key_ = key;
}

ServerMessenger::~ServerMessenger() {
}

void ServerMessenger::OnConnection(ConnectionKey key) {
  acceptor_->OnAccept(key);
}

}  // namespace net