CMediaSocketServer.h
上传用户:hhs829
上传日期:2022-06-17
资源大小:586k
文件大小:1k
- //
- // CMediaSocketServer.h
- // Created by Qiming Lu, 2002-02-26
- //
- #if !defined(__CMediaSocketServer_h__)
- #define __CMediaSocketServer_h__
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include "CWorkerSocket.h"
- #define MPEG1_PACK 2324
- // Payload types
- #define DATA_REQUEST 0X00 // Request the remote data
- #define DATA_REFUSED 0X01 // Refuse the remote data
- #define DATA_MEDIA 0X02 // Media data
- #define DISCONNECT_REQUEST 0X03 // Request the remote to shut down
- //////////////////////////////////////////////////////////////////////////////
- class CMediaSocketServer : public CWorkerSocket
- {
- public:
- CMediaSocketServer();
- virtual ~CMediaSocketServer();
- // Attributes
- protected:
- CFile m_objFile;
- CString m_strSourceFile;
- bool m_bReadyToSend;
- LONG m_lBytesSent;
- public:
- void SetSourceFile(const char * inPath);
- void SendAtOnce(void);
- virtual void ReceivingLoop(void);
- virtual void SendingLoop(void);
- };
- #endif // !defined(__CMediaSocketServer_h__)