易截截图软件、单文件、免安装、纯绿色、仅160KB

Linux下C++类的线程函数

最近在用C++编写一个RTSP的客户端,由于要用到线程,根据C编程的经验,写了如下代码:
class LiRtspSession
{
    public:
       void* MainThreadFunc(void* pvData);
       void* AudioProcThreadFunc(void* pvData);
       void Connect();
       //省略的代码
    private:
        pthread_t     m_hProcHandle, m_hAudioProcHandle;
        //省略的代码
};
void LiRtspSession::Connect()
{
    //create main thread creating rtsp session and receiving rtp/rtcp packet
    int ret = pthread_create(&m_hProcHandle, NULL, MainThreadFunc, this);
    if(ret != 0)
    {
         return;
    }
    //create a thread receiving audio data
    if(m_bAudioEnabled && m_eProtoType == ptUDP);
    {
         ret = pthread_create(&m_hAudioProcHandle, NULL, AudioProcThreadFunc, this);
         if(ret != 0)
         {
             return;
         }
    }
    pthread_join(m_hProcHandle, NULL);
 
    if(m_bAudioEnabled && m_eProtoType == ptUDP);
    {
          pthread_join(m_hAudioProcHandle, NULL);
    }
}
但是在编译时却出现如下错误:
    LiRtspSession.cpp: In member function ‘void LiRtspSession::Connect()’:
    LiRtspSession.cpp:176: error: argume


相关文档:

Linux下Shorewall防火墙安装与配置方法

环境说明:本机只有一张网卡,使用静态IP上网
    命令:apt-get install shorewall ubuntu会自动的给你安装好,但是shorewall没有配置
也没有启动
    「1」首先cp /usr/share/doc/shorewall/examples/one-interface/* /etc/shorewall
    「2」修改/etc/shorewall/shor ......

LINUX下文件权限的表示方法(chmod)

一、LINUX下关于文件权限的表示方法和解析  
 
LINUX下可以用ls -l 命令来看到文件的权限。用ls命令所得到的表示法的格式是类似这样的:-rwxr-xr-x 。下面解析一下格式所表示的意思。这种表示方法一共有十位:
 
9 8 7 6 5 4 3 2 1 0
- r w x r - x r - x
第9位表示文件类型,可以为p、d、l、s、c ......

我所熟悉的Linux命令

在这里整理一下我所熟悉的linux命令,这些命令应该是使用linux运营一个网站所需的基本命令,供想学习使用linux的同事参考。
大家也可以补充一些在工作中常用到的命令,只列系统命令和基本shell脚本,不涉及apache、tomcat、ftp、mysql管理。 
我只列出命令和常见的参数组合,含义就不解释了,大家问问google都会得到 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号