I'm having a bit of a problem testing comparing Strings sent from client to server using the alternet library (forum doesn't allow me to link it, but look it up in google, if needed). Maybe it's just ignorance, but I truly can't figure it out for myself.
What I'm trying to do is have the server read a String sent from one of its clients, and compare it to any other data in the server, so that it can iterate through several possible actions. Well, things got tricky for some reason, and I can't have it returning true in the following statement:
Code:void serverReceiveEvent(Server receivingServer, RemoteAddress client, String data) {
if(data == "testing") {
// do something
}
}
I've printed the data in the server, after it's received, and made sure it is receiving exactly a string with the "testing" value. Still, it refuses to validate that statement, and I truly can't understand why.
Any ideas?
Thanks, Ed.