mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-10 13:04:53 -04:00
Cleanup tlib
This commit is contained in:
parent
90b389c1ea
commit
8af2f9f7cc
@ -119,7 +119,6 @@ private:
|
|||||||
socket_protocol protocol; ///< The socket protocol
|
socket_protocol protocol; ///< The socket protocol
|
||||||
size_t fd; ///< The socket file descriptor
|
size_t fd; ///< The socket file descriptor
|
||||||
size_t error_code; ///< The error code
|
size_t error_code; ///< The error code
|
||||||
size_t local_port; ///< The local port
|
|
||||||
bool _connected; ///< Connection flag
|
bool _connected; ///< Connection flag
|
||||||
bool _bound; ///< Bind flag
|
bool _bound; ///< Bind flag
|
||||||
};
|
};
|
||||||
|
@ -215,8 +215,6 @@ tlib::socket::socket(socket_domain domain, socket_type type, socket_protocol pro
|
|||||||
} else {
|
} else {
|
||||||
error_code = open_status.error();
|
error_code = open_status.error();
|
||||||
}
|
}
|
||||||
|
|
||||||
local_port = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tlib::socket::~socket() {
|
tlib::socket::~socket() {
|
||||||
@ -276,7 +274,6 @@ void tlib::socket::client_bind(tlib::ip::address server) {
|
|||||||
auto status = tlib::client_bind(fd, server);
|
auto status = tlib::client_bind(fd, server);
|
||||||
if (!status) {
|
if (!status) {
|
||||||
_bound = false;
|
_bound = false;
|
||||||
local_port = *status;
|
|
||||||
} else {
|
} else {
|
||||||
error_code = status.error();
|
error_code = status.error();
|
||||||
}
|
}
|
||||||
@ -308,7 +305,6 @@ void tlib::socket::connect(tlib::ip::address server, size_t port) {
|
|||||||
auto status = tlib::connect(fd, server, port);
|
auto status = tlib::connect(fd, server, port);
|
||||||
if (status) {
|
if (status) {
|
||||||
_connected = true;
|
_connected = true;
|
||||||
local_port = *status;
|
|
||||||
} else {
|
} else {
|
||||||
error_code = status.error();
|
error_code = status.error();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user