# Port

HSMS(TCP/IP) 통신에 사용할 포트 번호를 설정합니다. `PassiveMode` 설정에 따라 이 포트의 역할이 달라집니다.

<table data-header-hidden><thead><tr><th width="146.59991455078125"></th><th width="162.4000244140625"></th><th></th></tr></thead><tbody><tr><td><strong>Mode</strong></td><td><strong>Port의 역할</strong></td><td><strong>비고</strong></td></tr><tr><td>Passive (1)</td><td>로컬 리스닝 포트</td><td>장비(서버)가 호스트의 접속을 기다리기 위해 개방하는 포트</td></tr><tr><td>Active (0)</td><td>원격 대상 포트</td><td>장비(클라이언트)가 접속하려는 호스트(서버)의 포트 번호</td></tr></tbody></table>

```csharp
// 포트 번호를 7000으로 설정
m_gem.Port = 7000;
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://nviasoft.gitbook.io/nviasoft-docs/api-reference/undefined/port.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.
