# PassiveMode

HSMS 연결 시 장비의 동작 모드를 설정하거나 현재 상태를 확인합니다.\
이 설정에 따라 장비가 서버(Server) 역할을 하며 접속을 기다릴지, 클라이언트(Client) 역할을 하며 호스트에 접속을 시도할지가 결정됩니다.

```csharp
// 장비는 서버를 열고 호스트가 접속하길 기다립니다. (PassiveMode)
m_gem.PassiveMode = 1; //PassiveMode
//m_gem.PassiveMode = 0; //ActiveMode

// 현재 모드 확인
if (m_gem.PassiveMode == 1)
{
    Console.WriteLine("현재 Passive 모드입니다. 호스트의 접속을 기다립니다.");
}
else
{
    Console.WriteLine("현재 Active 모드입니다. 호스트(IP/Port)로 접속을 시도합니다.");
}
```


---

# 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/passivemode.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.
