Luke Dowell
Luke Dowell

Reputation: 177

Client/Server Communication Between GWT Client and a Desktop-run Server

I'm attempting to write a browser based MMO using libGDX and it's HTML5/GWT port and I have no idea how to do the client/server interactions. I have already written the application for desktop as a sort of "learning" project for myself, and have now decided to rewrite it into the browser.

I have never done browser development before, so I'm not quite sure of how to go about doing the networking portion of the project. I fear that this is because I'm not quite sure as to how GWT actually works, especially when being used for what I'm doing. I attempted to use a library called KryoNet for the networking but apparently you cannot use normal networking methods for GWT. I received this error: http://pastebin.com/DVJPA44N

In short, I need help/direction with how to do a client/server communications type deal with GWT if it's even possible. If there is an easy google answer I apologize, I'm not sure how to word what I'm looking for.

Thank you!


EDIT: I looked at the WebSockets API, and that's not quite what I'm looking for. I want to host a server locally off the desktop and communicate to the client hosted in the browser. I apologize if I'm just misunderstanding the whole servlet setup in GWT.

Upvotes: 0

Views: 788

Answers (1)

appbootup
appbootup

Reputation: 9537

Did you have look at something like PlayN ( Angry Birds is top example using it with GWT for Browser port of the application )

Also you need to checkout WebSocket API ( either direct use in GWT/JSNI or via third-party gwt jar )

Upvotes: 2

Related Questions