Cocoa Async Socket java implementation

1k views Asked by At

On an iPhone project I'm using AsyncUdpSocket and AsyncSocket which I've found here.

Do you know if there is something similar for Android?

I've tried to search on google for a java verion of these classes but I haven't found any. By the way I've searched this "AsyncUdpSocket.java".

I've also found something about NIO libraries but I don't know if I can use it on Android.

1

There are 1 answers

6
Milk Tea On

I am not that familiar with Java, but since AsyncSocket is just a higher-level verison of Apple's socket API, all you need to do is create a socket in Java and receive the data. There is no "trick" the data will not be in "objective-c" so it's pretty easy to process (I created a Objc-> Python and that data was the same). Heres oracle on creating java sockets: http://docs.oracle.com/javase/tutorial/networking/sockets/index.html