Finished the API


So as I said last time I started to play with mulpti socket channels and was having issues, so I put it on the main port.

So last night I sat down to make a php page for the API, let me tell you I miss working in Nano! No crappy IDE highlighting, just me and my black background and text. But I’m wandering away from my point. So I wrote the page, and go to check to see if it works, and I’m getting garbly goop back from the server. So I poke into the bits see what’s happening and come to find out that you can’t access ObjectStream from non java. It had worked before I switched from PrintStream to Object Stream. And didn’t think about that.

So I was like ok you can’t mix sockets. Lets just build a small API app that would be the bridge. So busted that out today before the superbowl. Worked perfect(once I got past my domain port blocks). So was closing everything down getting ready to head out happy that I got it all working just fine. Then it occurred to me why not just put my query port on a different thread. That way it wouldn’t mess with the main socket, and it’s on it’s own port. No clue why I didn’t think about doing that when that exactly what I did for the API app.

So long story short. I added a API port to the server so you can get live details from the server, that is just a basic string with the info you requested. Thinking in the the future allow more in depth info like access to all the items, mobs,spells and stuff like that. But that’s all the future. I need to get back to working on content, the boring stuff.

Till next time…

Share