Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java sockets with out of band data

Does anybody know how to receive (how to know that you received) out-of-band data with Java sockets? In particular I've read the documentation for sendUrgentData and setOOBInline which states that:

Note, only limited support is provided for handling incoming urgent data. In particular, no notification of incoming urgent data is provided and there is no capability to distinguish between normal data and urgent data unless provided by a higher level protocol.

But I'm still hoping that somebody has a solution :-)

More details:

I'm sending serialized objects trough the socket and I'm not really seeing how I can find a "random" OOB byte inserted in the stream (other than the fact that Java will give me an exception when I'll try to deserialize the object).

like image 642
Grey Panther Avatar asked Oct 15 '22 17:10

Grey Panther


1 Answers

Tomcat has a maintained implementation of JNI socket which can read urgent packets in a OOB manner.

like image 123
kataru Avatar answered Oct 20 '22 02:10

kataru