The POCO C++ Libraries are powerful cross-platform C++ libraries for building network- and internet-based applications that run on desktop, server, mobile, IoT, and embedded systems.
i'm working on poco library and i want to create a TCP based program something like chatroom. I have a Server and a Client. when i use SocketStream to send messages to the server it doesn't work at the moment and send messages after the socket is closed(flush() doesn't work). i test socket.shutdownSend() it work but just for a message and after that close the socket. what should i do? is it better to use sendBytes and recieveBytes or no?
my client Code:
`int main() {
string message;
StreamSocket socket;
SocketAddress address("127.0.0.1", 8080);
i'm working on poco library and i want to create a TCP based program something like chatroom. I have a Server and a Client. when i use SocketStream to send messages to the server it doesn't work at the moment and send messages after the socket is closed(flush() doesn't work). i test socket.shutdownSend() it work but just for a message and after that close the socket. what should i do? is it better to use sendBytes and recieveBytes or no? my client Code: `int main() { string message; StreamSocket socket; SocketAddress address("127.0.0.1", 8080);
}`
mt server Code: `int main() { try { ServerSocket serverSocket(8080); cout << "Server started" << endl;
}`