Server-client Malfunction In Android (socket Is Not Bound/socket Is Already In Use)
Solution 1:
Please note that, depending on your Android version, AsyncTasks are not executed in parallel, unless you explicitly specify the executor for that.
I guess you'll have to actively connect to the converter device. If so, you don't have a server socket; it's really a client socket.
I have no idea why you create so many sockets along the way; a socket is a bi-directional communication channel.
If you really need a server socket, you wait vor incoming connections, which you
accept()
, andaccept()
will give you your client-specific socket.
Hote this helps; if not, you need to update your questions with information about the device you're connecting to, as far as I'm concerned.
Solution 2:
Done it, with the knowing, a socket is bidirectional and can read AND write i got it now, i just shifted 2 seperate classes into each other and voilá it works ^^ no doublebound sockets left. Thanks Class Stacker. FOr help with the same or an even issue have a look at the link above.
Post a Comment for "Server-client Malfunction In Android (socket Is Not Bound/socket Is Already In Use)"