summaryrefslogtreecommitdiff
path: root/implementation/endpoints/src/endpoint_definition.cpp
blob: 6a824c07d2898339adab9b6f353f974cf98b0202 (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Copyright (C) 2014 BMW Group
// Author: Lutz Bichler (lutz.bichler@bmw.de)
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

#include <vsomeip/constants.hpp>

#include "../include/endpoint_definition.hpp"

namespace vsomeip {

endpoint_definition::endpoint_definition() :
		port_(ILLEGAL_PORT) {
}

endpoint_definition::endpoint_definition(
		const boost::asio::ip::address &_address, uint16_t _port, bool _is_reliable) :
		address_(_address), port_(_port), is_reliable_(_is_reliable) {
}

const boost::asio::ip::address & endpoint_definition::get_address() const {
	return address_;
}

void endpoint_definition::set_address(const boost::asio::ip::address &_address) {
	address_ = _address;
}

uint16_t endpoint_definition::get_port() const {
	return port_;
}

void endpoint_definition::set_port(uint16_t _port) {
	port_ = _port;
}

bool endpoint_definition::is_reliable() const {
	return is_reliable_;
}

void endpoint_definition::set_reliable(bool _is_reliable) {
	is_reliable_ = _is_reliable;
}

} // namespace vsomeip