Skip to content

Port the SCTP transport #560

Closed
Closed

Description

@trustin

Now that the core API is pretty stable. We can start to port the SCTP transport.

Activity

  1. ghost assigned on Aug 24, 2012
  2. jestan commented on Sep 4, 2012

    @jestan
    Member

    Hi All,

    I have ported the basic SCTP Transport without any issue (#584),
    now I have following things, need to be clarified.

  3. normanmaurer commented on Sep 7, 2012

    @normanmaurer
    Member

    @jestan I guess in the Unsafe implementation you could add your multi homing operations. Does this sound ok ?

  4. jestan commented on Sep 9, 2012

    @jestan
    Member

    @norman it's great , thank you :-)

  5. normanmaurer commented on Sep 9, 2012

    @normanmaurer
    Member

    @jestan Could you isse a pull request to merge the transport tests in?

  6. jestan commented on Sep 10, 2012

    @jestan
    Member

    @norman, I will do it with in few days :), I would like to add OioSctp Transport and currently I am kind of stuck with following issue in io.netty.channel.socket.oio.OioEventLoop,

    The problem is, I have a OioSctpEchoServer running and I can connect and send messages from a Nio/Oio Sctp Client, but when I stop the client and start again, connection is established and closed immediately with following exception

    Sep 10, 2012 6:23:22 PM io.netty.handler.logging.LoggingHandler
    INFO: [id: 0xbd0b90d2, /127.0.0.1:42775 => /127.0.0.1:2556] REGISTERED
    Sep 10, 2012 6:23:22 PM io.netty.handler.logging.LoggingHandler
    INFO: [id: 0xbd0b90d2, /127.0.0.1:42775 => /127.0.0.1:2556] ACTIVE
    Sep 10, 2012 6:23:22 PM io.netty.handler.logging.LoggingHandler
    INFO: [id: 0xbd0b90d2, /127.0.0.1:42775 :> /127.0.0.1:2556] EXCEPTION: java.nio.channels.ClosedByInterruptException
    java.nio.channels.ClosedByInterruptException
    at java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:202)
    at sun.nio.ch.SctpChannelImpl.receive(SctpChannelImpl.java:772)
    at sun.nio.ch.SctpChannelImpl.receive(SctpChannelImpl.java:730)
    at io.netty.channel.socket.oio.OioSctpChannel.doReadMessages(OioSctpChannel.java:115)
    at io.netty.channel.socket.oio.AbstractOioMessageChannel$OioMessageUnsafe.read(AbstractOioMessageChannel.java:45)
    at io.netty.channel.socket.oio.OioEventLoop.run(OioEventLoop.java:81)
    at io.netty.channel.SingleThreadEventExecutor$1.run(SingleThreadEventExecutor.java:80)
    at java.lang.Thread.run(Thread.java:722)

    the reason for above issue is OioEventLoop thread is interrupted while it was blocking on sun.nio.ch.SctpChannelImpl.receive().

    I have noticed that, OioEventLoop wakeup() method is directly interrupting the thread which is not like other EventLoop. So I tried after modifying wakeup method, problem was solved.

    protected void wakeup(boolean inEventLoop) {
        interruptThread();
    }  
    
    
    @Override
    protected void wakeup(boolean inEventLoop) {
        if (!inEventLoop && isShutdown()) {
            interruptThread();
        }
    }
    

    this happens because current OioEventLoop is not compatible with blocking SctpChannel? or am I missing something here?

  7. normanmaurer commented on Sep 10, 2012

    @normanmaurer
    Member

    @jestan interesting.. what are the side-effects for the other OIO stuff with your changes ?

  8. normanmaurer commented on Sep 13, 2012

    @normanmaurer
    Member

    @jestan @trustin I close this as it was ported.. for the OIO we should open another issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions