internal void SetSecurityLevelClient(BTM_SEC securityLevel) { const bool isServerFalse = false; bool success = m_RfCommIf.SetSecurityLevel(WidcommUtils.SetSecurityLevel_Client_ServiceName, securityLevel, isServerFalse); if (!success) { throw new IOException(WidcommRfcommStreamBase.WrappingIOExceptionMessage, CommonSocketExceptions.Create_NoResultCode( CommonSocketExceptions.SocketError_SetSecurityLevel_Client_Fail, "SetSecurityLevel")); } }
public bool SetSecurityLevel(byte[] p_service_name, BTM_SEC securityLevel, bool isServer) { WidcommPortSingleThreader.MiscReturnCommand <bool> cmd = _st.AddCommand( new WidcommPortSingleThreader.MiscReturnCommand <bool>(delegate { return(_child.SetSecurityLevel(p_service_name, securityLevel, isServer)); })); return(cmd.WaitCompletion()); }