# 使用 ProudNet

為了使用ProudNet，<mark style="color:orange;">ProudNet 安裝位置</mark> -> <mark style="color:orange;">Lib</mark>資料夾中的Lib檔案必須連結到專案。 請連結與您正在使用的 Visual Studio 版本和編譯版本（偵錯、發布等）相符的版本。

{% hint style="danger" %}
請謹慎鏈接，如果版本不匹配，鏈接將無法工作。
{% endhint %}

可以透過將 <mark style="color:orange;">ProudNet.h</mark> 包含在 <mark style="color:orange;">./include</mark> 資料夾中來使用 ProudNet 模組。\
由於所有來源都與<mark style="color:orange;">namespace Proud</mark> 綁定，因此透過using namespace Proud 可以更方便地使用它們。

## 目錄

### :black\_small\_square: [伺服器和客戶端](/proudnet.cn/proudnet/using_pn/server_client.md)

### :black\_small\_square: [RMI](/proudnet.cn/proudnet/using_pn/rmi.md)

### :black\_small\_square: [PIDL](/proudnet.cn/proudnet/using_pn/pidl.md)

### :black\_small\_square: [事件處理](/proudnet.cn/proudnet/using_pn/eventhandling.md)

### :black\_small\_square: [通訊訊息](/proudnet.cn/proudnet/using_pn/tong-xun-xun-xi.md)

### :black\_small\_square: [P2P 通訊](/proudnet.cn/proudnet/using_pn/p2p.md)

## 程式碼範例變數

{% hint style="info" %}
為了幫助您理解，已經編寫了 C++ 和 C# 程式碼範例，因此請參考下面的變數。
{% endhint %}

{% tabs %}
{% tab title="C++" %}

<table><thead><tr><th width="196">變數名</th><th>註釋</th></tr></thead><tbody><tr><td>m_netCient </td><td>實例化的 CNetClient 對象</td></tr><tr><td>m_netServer </td><td>實例化的 CNetServer 物件</td></tr><tr><td>g_version </td><td>全域設定的 protocol version</td></tr></tbody></table>
{% endtab %}

{% tab title="C#" %}

<table><thead><tr><th width="201">變數名</th><th>註釋</th></tr></thead><tbody><tr><td>netClient </td><td>實例化的 NetClient 對象</td></tr><tr><td>netServer </td><td>實例化的 NetServer 物件</td></tr><tr><td>version </td><td>預設 protocol version 變數</td></tr><tr><td>simpleStub </td><td>使用者定義的Stub對象</td></tr><tr><td>simpleProxy </td><td>使用者定義的Proxy對象</td></tr></tbody></table>
{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.proudnet.com/proudnet.cn/proudnet/using_pn.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
