2020-01-24 18:56:51 +00:00
|
|
|
/*
|
|
|
|
Header NetworkConnection
|
|
|
|
|
|
|
|
Copyright (C) 2019 AleaJactaEst
|
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef NETWORK_CONNECTION_H
|
|
|
|
#define NETWORK_CONNECTION_H
|
|
|
|
|
|
|
|
#include "modules/bitstream/bitstream.h"
|
|
|
|
#include "modules/bitstreamqueue/bitstreamqueue.h"
|
|
|
|
#include "network_connection_core.h"
|
|
|
|
|
|
|
|
class NetworkConnection : public Reference {
|
|
|
|
GDCLASS(NetworkConnection, Reference)
|
|
|
|
protected:
|
|
|
|
static void _bind_methods();
|
|
|
|
public:
|
|
|
|
NetworkConnection();
|
|
|
|
~NetworkConnection();
|
|
|
|
|
|
|
|
/* _init must exist as it is called by Godot */
|
|
|
|
void _init() {};
|
|
|
|
|
|
|
|
void define_checksum_msg_xml(Array checksum_msg_xml);
|
|
|
|
void define_server(String host, int64_t port);
|
|
|
|
void define_user(String user_addr, String user_key, String user_id);
|
|
|
|
void define_lang(String lang);
|
2020-03-03 21:45:30 +00:00
|
|
|
void connect_to_server();
|
2020-01-24 18:56:51 +00:00
|
|
|
void disconnect_server();
|
|
|
|
void process(int delta);
|
|
|
|
int get_state();
|
2020-02-09 15:13:30 +00:00
|
|
|
void terminate_network_connection();
|
2020-01-24 18:56:51 +00:00
|
|
|
|
|
|
|
//MessageDescriptionNode & get_master_message_description_node();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // NETWORK_CONNECTION_H
|