sessionOptions.reuseEndpoint


true(默认值)时,connect() 将尝试重用现有端点,而不是为每个会话创建新的端点。这提供了连接池行为——多个会话可以共享单个 UDP 套接字。重用逻辑不会返回在与连接目标相同地址上监听的端点(以防止 CID 路由冲突)。

🌐 When true (the default), connect() will attempt to reuse an existing endpoint rather than creating a new one for each session. This provides connection pooling behavior — multiple sessions can share a single UDP socket. The reuse logic will not return an endpoint that is listening on the same address as the connect target (to prevent CID routing conflicts).

设置为 false 以强制为会话创建一个新的端点。当需要端点隔离时(例如,测试无状态重置行为时源端口身份很重要)这很有用。

🌐 Set to false to force creation of a new endpoint for the session. This is useful when endpoint isolation is required (e.g., testing stateless reset behavior where source port identity matters).