Create Client.
59 {
62
64
66 int error;
67 for (int i = 0; i < 100; i++)
68 {
69 std::stringstream ss0;
70 ss0 << "Hello Client! " << i;
71
73 buffer.
WriteFd(clientSocket.
Fd(), &error);
75
76 std::stringstream ss1;
77 ss1 << "Hello Server! " << i;
78 buffer.
ReadFd(clientSocket.
Fd(), &error);
79
81 }
82 }
std::string RetrieveAllAsString()
Get readable area data as string.
size_t WriteFd(SOCKET fd, int *saveErrno) const
Write to Socket.
size_t ReadFd(SOCKET fd, int *saveErrno)
Read from Socket.
void RetrieveAll()
Retrieve all buffer data.
void Append(const std::string &msg)
Append Message to this buffer.
Wrapper of readwrite buffer.
void Connect(InetAddress *connectAddress) const
Connect to socket.
void Create()
Create Non Blocking Socket.
const SOCKET Fd() const
Get this socket fd.
This class is Wrapper of socket.