예제 #1
0
 public int GetScn()
 {
     WidcommPortSingleThreader.MiscReturnCommand <int> cmd = _st.AddCommand(
         new WidcommPortSingleThreader.MiscReturnCommand <int>(delegate {
         return(_child.GetScn());
     }));
     return(cmd.WaitCompletion());
 }
예제 #2
0
        //--------------------------------------------------------------
        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);
        }