| # | Line 28 | Line 28 | SubNet::SubNet(){ | |
|---|---|---|
| 28 | ||
| 29 | string SubNet::sendTCP(string text){ | |
| 30 | ||
| 31 | < | char buf[1024]; |
| 31 | > | int size = 1024; |
| 32 | > | char buf[size]; |
| 33 | ||
| 34 | (*socket) << text.c_str() << "\n" << flush; // | |
| 35 | ||
| 36 | < | (*socket).getline (buf, 1024); |
| 36 | > | (*socket).getline (buf, size-1); |
| 37 | ||
| 38 | return buf; | |
| 39 | ||
| # | Line 55 | Line 56 | void SubNet::sendUPDPacket( string host, int port, str | |
| 56 | // int sndBufSize = (*udp)->sendbufsz(udpSize); | |
| 57 | ||
| 58 | (*udp)->connect (host.c_str(), port); | |
| 59 | < | (*udp) << message.c_str() << endl; |
| 59 | > | (*udp) << message.c_str() << flush << endl; |
| 60 | ||
| 61 | delete udp; | |
| 62 | ||
| – | Removed lines |
| + | Added lines |
| < | Changed lines |
| > | Changed lines |