I've never been able to achive valid TCP connection using
StreamSocket, I'm using c++ client and a java server, on the first try, I got connection but apperently the StreamSocket sent an
tag without been asked to, thus the server flunked, on the second try, the connection was made but terminated instantly.
under c++ I'm used
- Code: Select all
Poco::Net::StreamSocket socket(Poco::Net::SocketAddress(host, "5221") );
or
- Code: Select all
Poco::Net::StreamSocket socket;
socket.connect(Poco::Net::SocketAddress(host, "5221") );
none of them worked on the second try
on the server side, I used
- Code: Select all
final ConnectionHandler newConnection = new
ConnectionHandler(this.serverSocket.accept(), new EchoProtocol());
new Thread(newConnection).start();
the server worked perfectly with a java client
I have no idea why it worked the first time but not the second time.
can it be gcc or 64 bit related?
p.s. great work, handling XML using SAX with jdom took me 5 days, with SAXparser from poco it took 8 hours to write and test!
the DFS idea is great.
keep up the good work





