Tao.Sdl SDK Documentation

SdlNet.SDLNet_Init Method 

Initialize the network API.

[Visual Basic]
Public Shared Function SDLNet_Init() As Integer
[C#]
public static int SDLNet_Init();

Return Value

0 on success, -1 on errors

Remarks

This must be called before using other functions in this library. SDL must be initialized before this call because this library uses utility functions from the SDL library.

Binds to C-function call in SDL_net.h:

extern DECLSPEC int  SDLCALL SDLNet_Init(void);

Example

            if(SDL_Init(0)==-1) {
            printf("SDL_Init: %s\n", SDL_GetError());
            exit(1);
            }
            if(SDLNet_Init()==-1) {
            printf("SDLNet_Init: %s\n", SDLNet_GetError());
                    exit(2);
            }
            

See Also

SdlNet Class | Tao.Sdl Namespace | SDLNet_Quit