|
Mario Kart 64
|
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <SDL2/SDL.h>#include <SDL2/SDL_net.h>#include "networking.h"#include "main.h"Macros | |
| #define | BUFFER_SIZE 10240 |
Functions | |
| void | ConnectToServer (char *ip, uint16_t port, char *username) |
| void | set_username (const char *username) |
| void | networking_init (char *ip, uint16_t port) |
| int | networking_loop (void *data) |
| void | networking_ready_up (bool value) |
| void | handleReceivedData (const char *buffer, size_t bufSize) |
| void | networking_cleanup (SDLNet_SocketSet socketSet) |
| void | networking_disconnect (void) |
Variables | |
| NetworkClient | dummyClient |
| NetworkClient * | localClient = NULL |
| NetworkClient | clients [NETWORK_MAX_PLAYERS] |
| Network | gNetwork |
| SDL_Thread * | sNetworkThread |
| bool | threadStarted = false |
| int | isNetworkingThreadEnabled = true |
| void(* | remoteConnectedHandler )(void) |
| #define BUFFER_SIZE 10240 |
| void ConnectToServer | ( | char * | ip, |
| uint16_t | port, | ||
| char * | username ) |
| void handleReceivedData | ( | const char * | buffer, |
| size_t | bufSize ) |
| void networking_cleanup | ( | SDLNet_SocketSet | socketSet | ) |
| void networking_disconnect | ( | void | ) |
| void networking_init | ( | char * | ip, |
| uint16_t | port ) |
| int networking_loop | ( | void * | data | ) |
| void networking_ready_up | ( | bool | value | ) |
| void set_username | ( | const char * | username | ) |
| NetworkClient clients[NETWORK_MAX_PLAYERS] |
| NetworkClient dummyClient |
| Network gNetwork |
| int isNetworkingThreadEnabled = true |
| NetworkClient* localClient = NULL |
| void(* remoteConnectedHandler) (void) | ( | void | ) |
| SDL_Thread* sNetworkThread |
| bool threadStarted = false |