⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nulldriver.cpp

📁 PPP协议的实现演示
💻 CPP
字号:
#include "globals.h"

/***************************************************************************
                          CNullDriver.cpp  -  description
                             -------------------
    begin                : Sun Apr 29 2001
    copyright            : (C) 2001 by Birdy57 (Stephane)
    email                : birdy57@multimania.com
 ***************************************************************************/ 
    
/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/ 
#include <stdlib.h>
    
#include "nulldriver.h"
    
CNullDriver::CNullDriver() 
{    
m_bConnected = false;    
m_nErrorNbr = 0;    
m_sName = NULL;
}

CNullDriver::~CNullDriver() 
{

}

//  Connection
    bool CNullDriver::Connect() 
{    
return false;
}

// Deconnection
    bool CNullDriver::Disconnect() 
{    
m_bConnected = false;    
return true;
}

// Lecture de nSize octet(s)
int CNullDriver::Read(char *pData, int nSize) 
{    
return 0;			// make gcc happy
}

// Ecriture de nSize octet(s),
// la fonction retourne le nombre d'octet reelement ecrit ou ERROR
int CNullDriver::Write(char *pData, int nSize) 
{    
return 0;
}


// Lecture du nr de l'erreur
int CNullDriver::GetErrorNbr() 
{    
return m_nErrorNbr;
}

// on est connect

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -