--- projects/cms/source/host/c++/SubNet.cpp 2001/03/05 14:02:27 1.1 +++ projects/cms/source/host/c++/SubNet.cpp 2001/03/06 00:39:13 1.2 @@ -28,11 +28,12 @@ SubNet::SubNet(){ string SubNet::sendTCP(string text){ - char buf[1024]; + int size = 1024; + char buf[size]; (*socket) << text.c_str() << "\n" << flush; // - (*socket).getline (buf, 1024); + (*socket).getline (buf, size-1); return buf; @@ -55,7 +56,7 @@ void SubNet::sendUPDPacket( string host, int port, str // int sndBufSize = (*udp)->sendbufsz(udpSize); (*udp)->connect (host.c_str(), port); - (*udp) << message.c_str() << endl; + (*udp) << message.c_str() << flush << endl; delete udp;