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
相关文档:
Service Discovery Protocol(SDP)提供一种能力,让应用程序有方法发现哪种服务可用以及这种服务的特性。
服务发现协议(SDP或Bluetooth SDP)在蓝牙协议栈中对蓝牙环境中的应用程序有特殊的含意,发现哪个服务是可用的和确定这些可用服务的特征。SDP定义了bluetooth client发现可用bluetooth server服务和它们的特征的方法。 ......
系统环境:Windows 7
软件环境:Visual C++ 2008 SP1 +SQL Server 2005
本次目的:编写一个航空管理系统
这是数据库课程设计的成果,虽然成绩不佳,但是作为我用VC++ 以来编写的最大程序还是传到网上,以供参考。用VC++ 做数据库设计并不容易,但也不是不可能。以下是我的程序界面,后面 ......
这个和RHEL5上面的iscsi-initiator-utils-6.xxxx不一致,RHEL5上面的方式网上有比较多的方式,这里主要介绍的是TRHEL4下的iscsi-initiator-utils-4.xxxx的配置方式
linux 版本
[oracle@inthrac02 ~]vi /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 7)
ulimit -r
[oracle@inthrac02 ~]$ ......
如果你正在为linux分区空间不足而苦恼时,请你一定要往下看。
linux LVM(logical volumes management),这个时linux中的逻辑卷管理软件,可以在开机情况下重新划分分区大小。
LVM允许一组不同的块设备(硬盘,分区,磁盘阵列...)组合到一起成为一个大存储设备,这就是卷组(volume group)。
下面我们来开始建立一个卷组 ......