sdlNetDestroyServer function

void sdlNetDestroyServer(
  1. Pointer<SdlNetServer> server
)

Dispose of a previously-created server.

This will immediately disconnect any pending client connections that had not yet been accepted, but will not disconnect any existing accepted connections (which can still be used and must be destroyed separately). Further attempts to make new connections to this server will fail on the client side.

\param server server to destroy.

\threadsafety You should not operate on the same server from multiple threads at the same time without supplying a serialization mechanism. However, different threads may access different servers at the same time without problems.

\since This function is available since SDL_Net 3.0.0.

\sa SDLNet_CreateServer

extern SDL_DECLSPEC void SDLCALL SDLNet_DestroyServer(SDLNet_Server *server)

Implementation

void sdlNetDestroyServer(Pointer<SdlNetServer> server) {
  final sdlNetDestroyServerLookupFunction = libSdl3Net.lookupFunction<
      Void Function(Pointer<SdlNetServer> server),
      void Function(Pointer<SdlNetServer> server)>('SDLNet_DestroyServer');
  return sdlNetDestroyServerLookupFunction(server);
}