Files
2022-10-26 12:25:11 +08:00

26 lines
426 B
C++

#ifndef __ClientSocket_H
#define __ClientSocket_H
#pragma comment(lib, "ws2_32.lib")
#include <Winsock2.h>
#include <Windows.h>
#include <stdio.h>
class ClientSocket
{
public:
ClientSocket();
~ClientSocket();
bool Connect( LPCTSTR ipAddress, u_short portNo );
void Close();
int Send( LPVOID buffer, int size );
int Recv( LPVOID buffer, int size );
private:
SOCKET m_socketValue;
};
#endif