Project Settings
1. Set up your project
Set up projects for each environment.
2. Creating a PIDL file
To use Remote Method Invocation(RMI) in ProudNet, you must first create a file with the PIDL extension.
The PIDL file is the source file that defines the messages that will be sent and received between the hosts. Compiling the PIDL file will create a proxy and a stub, which will be included in the host program.
Do not specify a message first ID value of 60,000 or higher. Values above 60,000 are already specified as message ID values in ProudNet's internal PIDL. Overlapping message IDs will cause an exception in the AttachProxy and AttachStub functions.
The following are the basic usage formats for PIDL files.
Namespace The C++ namespace name of the proxy, stub module that is generated when the PIDL file is compiled. A namespace is essential because ProudNet can use more than one proxy, stub, or stubs at once, but the ambiguity must be resolved with a namespace. For example, if you declare "LobbyC2S", it means "Declare a client -> server call RMI in the game lobby". The first ID value in the message When invoked, each RMI is converted to a network message, which will have an ID value in the message header. It is important to note that it is common to have multiple proxies and stubs for inter-process communication, and they should not have overlapping message ID ranges. Declaring attributes [in] declaration is required. Declaring functions The name of the RMI function. Function parameters It is similar to a C++ function declaration. Parameters are allowed to be declared as follows, but pointer types are not.
An example PIDL file is shown below.
Run the PIDL compiler
Start a server and client to prepare of using ProudNet.
Last updated