Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
network.hpp File Reference
#include <enet/enet.h>

Go to the source code of this file.

Functions

void sendclientpacket (ENetPacket *packet, int chan)
 
void flushclient ()
 
void disconnect (bool async=false, bool cleanup=true)
 
bool isconnected (bool attempt=false, bool local=true)
 
const ENetAddress * connectedpeer ()
 
bool multiplayer (bool msg=true)
 
void neterr (const char *s, bool disc=true)
 
void gets2c ()
 
void notifywelcome ()
 This function gets executed as we get connected. More...
 
ENetPacket * send_file (stream *file, const char *format="",...)
 Send a file to all other clients. More...
 
void connectserv (const char *servername, int port, const char *serverpassword, const char *mapwish=nullptr, int modewish=-1)
 
void abortconnect ()
 
void clientkeepalive ()
 
bool resolverwait (const char *name, ENetAddress *address)
 

Function Documentation

void abortconnect ( )
void clientkeepalive ( )

References clienthost.

Referenced by genenvmap(), and renderprogress().

const ENetAddress* connectedpeer ( )

References curpeer.

Referenced by game::renderscoreboard().

void connectserv ( const char *  servername,
int  port,
const char *  serverpassword,
const char *  mapwish = nullptr,
int  modewish = -1 
)
void disconnect ( bool  async = false,
bool  cleanup = true 
)
void flushclient ( )
void gets2c ( )
bool isconnected ( bool  attempt = false,
bool  local = true 
)
bool multiplayer ( bool  msg = true)
void neterr ( const char *  s,
bool  disc = true 
)
void notifywelcome ( )

This function gets executed as we get connected.

Referenced by game::parsemessages().

bool resolverwait ( const char *  name,
ENetAddress *  address 
)
ENetPacket* send_file ( stream file,
const char *  format = "",
  ... 
)

Send a file to all other clients.

References CHAN_FILE, make_file_packet(), and sendclientpacket().

Referenced by game::sendmap().

void sendclientpacket ( ENetPacket *  packet,
int  chan 
)