Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
Multicast.h
Package: 视频会议系统.rar [view]
Upload User: popouu88
Upload Date: 2013-02-11
Package Size: 2894k
Code Size: 1k
Category:
VOIP program
Development Platform:
Visual C++
- // Multicast.h: interface for the CMulticast class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_MULTICAST_H__F513328F_B1AE_4FBB_BA82_777E938EB58D__INCLUDED_)
- #define AFX_MULTICAST_H__F513328F_B1AE_4FBB_BA82_777E938EB58D__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include "winsock2.h"
- #include "Ws2tcpip.h"
- #include "....公共类Buffer.h"
- #define MAX_BUFFER_SIZE 50000
- class CMulticast
- {
- public:
- CMulticast();
- virtual ~CMulticast();
- //加入组播组
- bool AddMemberShip( const char * ip , const int port );
- //移出组播组
- void DropMemberShip( void );
- //是否连接
- bool IsConnected( void ){ return this->m_sock != INVALID_SOCKET; }
- //发送组播数据
- bool SendTo( CBuffer & buffer );
- //接收组播数据
- bool ReceiveFrom( CBuffer & buffer );
- void SetData( int user_data ){ this->user_data = user_data; }
- int GetData( void ){ return this->user_data; }
- private:
- static int InitWSAStatup;
- SOCKET m_sock;
- struct sockaddr_in addr;
- struct ip_mreq command;
- int user_data;
- char recvBuffer[ MAX_BUFFER_SIZE ];
- };
- #endif // !defined(AFX_MULTICAST_H__F513328F_B1AE_4FBB_BA82_777E938EB58D__INCLUDED_)