• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to build a sample sctp application in windows platform?  RSS feed

 
phooton misra
Ranch Hand
Posts: 52
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to build a sample sctp application in windows platform?
 
Tony Docherty
Bartender
Posts: 3205
78
 
phooton misra
Ranch Hand
Posts: 52
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes i have the link that you have mentioned ,below is my code snippet:


public class TestSCTP
{


public static void main(String[] args) throws Exception {
com.sun.nio.sctp.SctpChannel sc = com.sun.nio.sctp.SctpChannel.open();


}
}


After running I am getting the below error:

Exception in thread "main" java.lang.UnsupportedOperationException: SCTP not supported on this platform
at sun.nio.ch.sctp.SctpChannelImpl.<init>(SctpChannelImpl.java:48)
at com.sun.nio.sctp.SctpChannel.open(SctpChannel.java:166)
at TestSCTP.main(TestSCTP.java:6)
 
Tony Docherty
Bartender
Posts: 3205
78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The exception tells you the problem ie SCTP is not supported on the platform (Operating System) you are running the program on.

What is the platform and what version of Java are you using?

 
phooton misra
Ranch Hand
Posts: 52
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Windows 7 and jdk 8 ,I tried with jdk 7 also.but getting the same error.
 
Tim Cooke
Marshal
Posts: 3652
184
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to the Wiki page on Stream Control Transmission Protocol Windows does not support that protocol, but "The SctpDrv kernel driver is a port of the BSD SCTP stack to Windows".
 
Steve Betnér
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know that this post is rather old but I've been researching this topic aswell since I want to use SCTP in a Project I'm working on. There's a user space C library that implements SCTP over UDP called usrsctp. I've found that a Company called Jitsi is using that library for their networking code and they've made it available as a Java library.
I haven't had time to try it just yet but take a look here: https://github.com/jitsi/libjitsi/tree/master/src/org/jitsi/sctp4j
The C library can be found here: https://github.com/sctplab/usrsctp/blob/master/Manual.md

 
Steve Betnér
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have now successfully ported the sample code for a DayTime client/server in the "Stream Control Transport Protocol (SCTP) in Java" article to use the Jitsi library.
Article: http://www.oracle.com/technetwork/articles/javase/index-139946.html

The SCTP traffic is sent over UDP which I think is a good idea since there is network equipment on the Internet that doesn't support SCTP.

The code runs on my Windows 10 x64 machine.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!