#ifndef _UDPSOCKET_H_
#define _UDPSOCKET_H_
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdlib.h>
#include <assert.h>
#include <stdio.h>
#include <time.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <string.h>
#include <netinet/tcp.h> 
#include <pthread.h>
#include <sys/prctl.h> 
#define DF_NET_MSGBUFLEN 20*1024	

//网络解码 用UDP
typedef struct _UdpHandle_T{
	int sockfd;
	int port; 
	char imgBuff[5*1024];
	int imgLen;
}UdpHandle_T;


int NetMulicastServerSocketInit(int port);
int NetCreateUdpMulicast(UdpHandle_T *handle);
int NetUdpSendMsgBySocket(int sockfd,char *ip, int port,char *msg,int len);
int checkUdpImg(unsigned char *buff,int len);
int WirteFile(const char *path,unsigned char *str,int len);
int NetImg2Bmp(char *info,const char *path);

#endif 


