#ifndef _SSTP_CLIENTSOCKETSENDER_HPP_ #define _SSTP_CLIENTSOCKETSENDER_HPP_ #include #include #include #include #include #include #include #include #include #include #include #include class ClientSocketSender { public: ClientSocketSender(); ClientSocketSender(String ipAddress,int port); virtual ~ClientSocketSender(); bool sendFile(String &pathFileName); bool isOkay(void); private: static constexpr int BUFFER_LENGTH=1048576; // This buffer length is used for both reading the file and also the packet transmission length void close(void); bool sendPacketIndicator(DWORD bytesToSend); bool sendPacket(Array &buffer,DWORD bytesToSend); bool sendPutIndicator(String fileName,DWORD fileLength); bool sendQuit(void); struct sockaddr_in mInternalSocketAddress; int mSocket; String mIPAddress; int mPort; }; #endif