I'm reading the source code of godot, and I can't understand how NetSocket class creates its instance.
In net_socket.cpp, create() is defined, but I can't see how it works.
#include "net_socket.h"
NetSocket *(*NetSocket::_create)() = NULL;
NetSocket *NetSocket::create() {
if (_create)
return _create();
ERR_PRINT("Unable to create network socket, platform not supported");
return NULL;
}
Especially, what is _create
? And what does NetSocket *(*NetSocket::_create)() = NULL;
do actually?