aboutsummaryrefslogtreecommitdiffstats
path: root/fnet/src/vespa/fnet/channel.cpp
blob: da7f94a99ea6e247f185784a61fa0a85d12e0882 (plain) (blame)
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
33
34
35
36
37
38
39
40
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "channel.h"
#include "connection.h"

bool
FNET_Channel::Send(FNET_Packet *packet)
{
    return _conn->PostPacket(packet, _id);
}

void
FNET_Channel::Sync()
{
    _conn->Sync();
}

FNET_IPacketHandler::HP_RetCode
FNET_Channel::Receive(FNET_Packet *packet)
{
    return _handler->HandlePacket(packet, _context);
}

bool
FNET_Channel::Close()
{
    return _conn->CloseChannel(this);
}

void
FNET_Channel::Free()
{
    _conn->FreeChannel(this);
}

void
FNET_Channel::CloseAndFree()
{
    _conn->CloseAndFreeChannel(this);
}