Project Settings
1. Set up your project
Set up projects for each environment.
▪️ C++
▪️ C#
▪️ Mac Xcode
▪️ Linux
▪️ Unity3D
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.
global <Namespace> <The first ID value in the message>
{
([Declaring attributes]) <Declaring functions> ( [in] Function parameters, ... );
}
An example PIDL file is shown below.
rename cs(Proud::String, System.String);
global LobbyC2S 5000 // Message ID starts at 5000
{
// ID=5001
Logon([in] Proud::String name,[in] Proud::String password);
RequestRoomList([in] int pageNumber); // ID=5002
Chat([in] Proud::String name); // ID=5003
}
Run the PIDL compiler
Start a server and client to prepare of using ProudNet.
Last updated