public int GetScn() { WidcommPortSingleThreader.MiscReturnCommand <int> cmd = _st.AddCommand( new WidcommPortSingleThreader.MiscReturnCommand <int>(delegate { return(_child.GetScn()); })); return(cmd.WaitCompletion()); }
//-------------------------------------------------------------- internal int SetScnForLocalServer(Guid serviceGuid, int scn) { bool success = m_RfCommIf.ClientAssignScnValue(serviceGuid, scn); if (!success) { throw new IOException(WidcommRfcommStreamBase.WrappingIOExceptionMessage, CommonSocketExceptions.Create_NoResultCode( CommonSocketExceptions.SocketError_SetSecurityLevel_Client_Fail, "SetScnForLocalServer")); } int scnAssigned = m_RfCommIf.GetScn(); Utils.MiscUtils.Trace_WriteLine("Server GetScn returned port: {0}", scnAssigned); Debug.Assert(scnAssigned != 0); return(scnAssigned); }