Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
network.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <enet/enet.h>
4 
5 struct stream;
6 
7 extern void sendclientpacket(ENetPacket *packet, int chan);
8 extern void flushclient();
9 extern void disconnect(bool async = false, bool cleanup = true);
10 extern bool isconnected(bool attempt = false, bool local = true);
11 extern const ENetAddress *connectedpeer();
12 extern bool multiplayer(bool msg = true);
13 extern void neterr(const char *s, bool disc = true);
14 extern void gets2c();
15 extern void notifywelcome();
17 extern ENetPacket *send_file(stream *file, const char *format = "", ...);
18 
19 extern void connectserv(const char *servername, int port, const char *serverpassword, const char *mapwish = nullptr, int modewish = -1);
20 extern void abortconnect();
21 extern void clientkeepalive();
22 
23 extern bool resolverwait(const char *name, ENetAddress *address);
void disconnect(bool async=false, bool cleanup=true)
Definition: client.cpp:174
void neterr(const char *s, bool disc=true)
Definition: client.cpp:237
ENetPacket * send_file(stream *file, const char *format="",...)
Send a file to all other clients.
Definition: client.cpp:250
void sendclientpacket(ENetPacket *packet, int chan)
Definition: client.cpp:225
bool isconnected(bool attempt=false, bool local=true)
Definition: client.cpp:67
const ENetAddress * connectedpeer()
Definition: client.cpp:74
void format(tagval *args, int numargs)
Definition: command.cpp:2584
void clientkeepalive()
Definition: client.cpp:244
void abortconnect()
Definition: client.cpp:99
bool multiplayer(bool msg=true)
Definition: client.cpp:37
void notifywelcome()
This function gets executed as we get connected.
Definition: menus.cpp:575
Legacy file system streams.
Definition: stream.hpp:22
static aviwriter * file
Definition: movie.cpp:830
bool resolverwait(const char *name, ENetAddress *address)
Definition: serverbrowser.cpp:153
void cleanup()
cleans up game memory and SDL at exit
Definition: main.cpp:70
void flushclient()
Definition: client.cpp:231
void connectserv(const char *servername, int port, const char *serverpassword, const char *mapwish=nullptr, int modewish=-1)
Definition: client.cpp:111
void gets2c()
Definition: client.cpp:262