As for the code for the last assignment, it did take me a while. I do network programming all the time and I understand how to get a buffer of bytes down a socket and deserialized on the other end pretty well. What killed me for this assignments is pointers and its really my responsibility to go back and relearn a lot of that stuff because like I said, C++ is very powerful. I have to say I am really happy we are doing things the more or less manual way. Really shows how "Advanced" concepts are really pretty simple when you break them all the way down to their basic components.
Sockets! Yes, interesting thing came across the other day. Zombie Yoga now has a statistics gathering server which I wrote the other week. It receives data and parses it into XML for easier read by other devices upon request. Now its time to attatch something cool to the server, like say... a phone or a tablet. As easy as this sounds, this is actually quite annoying. One would assume you just use the java tcp socket (Android) and as long as there is nothing blocking communication, you have a green flag to do post TCP handshakes (verify that your actually who you say you are, or else the server will be busy analyzing packets it doesn't know what to do with) and start passing data to it. Well, no go. First of all, C# is little-endian while Java is big-endian. Ok, too lazy to write a function for that, got Guava. Works, all great. I port this code to Android and it refuses to connect. Nothing. Same code, being executed, nothing. Still have to figure out why I'm having communication problems. Hmmm... got an idea of whats wrong. Ill get back to you guys if I come up with something!
No comments:
Post a Comment