Vp create: Difference between revisions

From Virtual Paradise Wiki
Jump to navigation Jump to search
m updated syntax highlighting tags
Sleepy E (talk | contribs)
m Updated to new API
Line 1: Line 1:
{{sdk method page|create|Creates a VPInstance in memory for use with connecting to a world or universe.|customparam=
{{sdk method page|create|Creates a VPInstance in memory for use with connecting to a world or universe.
|customparamex=
|parameters=
  {{sdk parameter row|vp_net_config*|net_config|Network configuration for the instance or NULL to use the default select-based implementation. The contents of the structure will be copied.}}
|customparamex=net_config
|noinstanceparam=
|noinstanceparam=
|returns=A pointer to the newly created instance, or {{code|NULL}} if something went wrong whilst trying to create one.
|returns=A pointer to the newly created instance, or {{code|NULL}} if something went wrong whilst trying to create one.
|examples=
|examples=
<syntaxhighlight lang="c">VPInstance instance;
<syntaxhighlight lang="c">VPInstance instance;
instance = vp_create();</syntaxhighlight>
instance = vp_create(NULL);</syntaxhighlight>
|seealso=
|seealso=
* {{sdk method|connect_universe}}
* {{sdk method|connect_universe}}

Revision as of 21:22, 13 December 2016

Method call snippet vp_create(net_config);

Creates a VPInstance in memory for use with connecting to a world or universe.

Parameters

These are the parameters that this method requires:

Parameter Usage
vp_net_config*
net_config
Network configuration for the instance or NULL to use the default select-based implementation. The contents of the structure will be copied.

Returns

A pointer to the newly created instance, or NULL if something went wrong whilst trying to create one.

Behavior

There is no special behavior for this method

Examples

VPInstance instance;
instance = vp_create(NULL);

See also