public bCAPClient(string strConn, int iTimeout, int iRetry) { if (strConn.Length < 3) { throw new ArgumentException(); } string strOpt = strConn.Substring(0, 3).ToLower(); switch (strOpt) { case "tcp": m_conn = new bCAPConnectionTCP(); break; case "udp": m_conn = new bCAPConnectionUDP(); break; default: throw new ArgumentException(); } // パラメータ解析 var optEth = ConnOptParser.ParseEtherOption(strConn); // 接続 m_conn.Connect(optEth, iTimeout, iRetry); }
public void Dispose() { if (m_conn != null) { m_conn.Dispose(); m_conn = null; } }