Exemplo n.º 1
0
 public int GetScn()
 {
     WidcommPortSingleThreader.MiscReturnCommand <int> cmd = _st.AddCommand(
         new WidcommPortSingleThreader.MiscReturnCommand <int>(delegate {
         return(_child.GetScn());
     }));
     return(cmd.WaitCompletion());
 }
Exemplo n.º 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);
        }