Hmmm... I'm no expert on this subject, but did find this: http://java.sun.com/j2se/1.5.0/docs/api/java/net/Socket.html#setOOBInline(boolean)

Maybe that could help you?


Jeroen Brattinga


minatds wrote:
Hi all,
I tried to do a quick fix/hack.
I have made SocketSessionImpl as public and used it in my
AbstractProxyIOHandler (Proxy example) message received method. Below is the
code snippet.
I get Urgent data not supported exception.
I am totally lost now - any ideas on how to create a fix for this.

thanks a lot
Sincerely
minatds


here is the code snippet:

public void messageReceived(IoSession session, Object message)
            throws Exception {
        ByteBuffer rb = (ByteBuffer) message;
              ByteBuffer wb = ByteBuffer.allocate(rb.remaining());
        rb.mark();
        wb.put(rb);
wb.flip();
        ((IoSession) session.getAttachment()).write(wb);
        rb.reset();
        if(rb.getString(CHARSET.newDecoder()).trim().equals("A"))
                {
                        SessionLog.info(session,"##########We have got a Urgent 
Packet
#########");
                        
((SocketSessionImpl)session).getCh().socket().sendUrgentData(1);
                }
        SessionLog.info(session,rb.getString(CHARSET.newDecoder()));
    }



ClientToProxyIoHandler  - [/127.0.0.1:3530] EXCEPTION, please implement
ClientToProxyIoHandler.exceptionCaught() for proper handling:
java.net.SocketException: Urgent data not supported
        at sun.nio.ch.SocketAdaptor.sendUrgentData(Unknown Source)
        at 
AbstractProxyIoHandler.messageReceived(AbstractProxyIoHandler.java:69)
        at
org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived(AbstractIoFilterChain.java:569)
        at
org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:299)
        at
org.apache.mina.common.support.AbstractIoFilterChain.access$5(AbstractIoFilterChain.java:296)
        at
org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:647)
        at
org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:220)
        at
org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:265)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown 
Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

Reply via email to