servalproject/serval-dna — pull request #53 by rom1v (2013-02-21 15:56:25+00:00)
Title: MDP sockets support (suite)

As [this pull request](https://github.com/servalproject/serval-dna/pull/39) has been closed due to branch renaming, I open a new one.

I just fixed a [deadlock issue](https://github.com/rom1v/batphone/commit/38081072dbb4f7ee3c2a405eb92635c257fb7987) on the Java part.

But a problem persisted: if a thread would `close()` a socket, any blocking `receive()` would not exit as expected. Calling `shutdown()` instead of `close()` fixes the problem (commit f93642c).

As it is worth knowing a blocking `receive()` has failed due to socket `close()`, commit 8d2ce4b gives the information to the caller (in exception message, like Java `DatagramSocket` does).

Waiting for your feedbacks...