001    package dk.i1.sctp;
002    import java.net.SocketException;
003    import java.net.InetAddress;
004    import java.net.InetSocketAddress;
005    
006    /**A one-to-one SCTP socket.
007    A one-to-one socket is used when you need a single endpoint connected to a single other endpoint.
008    This is typically used in client-like sockets.
009    A OneToOneSCTPSocket can accept inbound associations but at most one at the time.
010    Contrast with {@link OneToManySCTPSocket}.
011    */
012    public class OneToOneSCTPSocket extends SCTPSocket {
013            /**Creates an unbound socket.
014            */
015            public OneToOneSCTPSocket() throws SocketException {
016                    super(false);
017            }
018            /**Creates a socket bound to the specified port.
019             *@param port The SCTP port to bind to. The socket is bound to all available interfaces (subject to system policies)
020             */
021            public OneToOneSCTPSocket(int port) throws SocketException {
022                    super(false,port);
023            }
024            
025            /**Accept an incoming association.
026            */
027            public OneToOneSCTPSocket accept() throws SocketException {
028                    return accept_native();
029            }
030            
031            private native OneToOneSCTPSocket accept_native() throws SocketException;
032    }