Initial
This commit is contained in:
31
CapServer/SocketHeader.hpp
Normal file
31
CapServer/SocketHeader.hpp
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef _CAPSERVER_SOCKET_HEADER_HPP_
|
||||
#define _CAPSERVER_SOCKET_HEADER_HPP_
|
||||
#ifndef _COMMON_WINDOWS_HPP_
|
||||
#include <common/windows.hpp>
|
||||
#endif
|
||||
#ifndef _SOCKET_SOCKET_HPP_
|
||||
#include <socket/socket.hpp>
|
||||
#endif
|
||||
|
||||
class SocketHeader
|
||||
{
|
||||
public:
|
||||
typedef enum ContentType{Unknown,ImageJPG};
|
||||
SocketHeader();
|
||||
virtual ~SocketHeader();
|
||||
int getSizeHeader(void)const;
|
||||
int getVersion(void)const;
|
||||
void setVersion(int version);
|
||||
int getContentLength(void)const;
|
||||
void setContentLength(int contentLength);
|
||||
ContentType getContentType(void)const;
|
||||
void setContentType(int contentType);
|
||||
bool marshall(Socket &socket);
|
||||
bool unmarshall(Socket &socket);
|
||||
private:
|
||||
int mSizeHeader;
|
||||
int mVersion;
|
||||
int mContentLength;
|
||||
int mContentType;
|
||||
};
|
||||
#endif
|
||||
Reference in New Issue
Block a user