Beispiel #1
0
        /// <summary>
        /// Opens a socket channel.
        ///
        /// <para> The new channel is created by invoking the {@link
        /// java.nio.channels.spi.SelectorProvider#openSocketChannel
        /// openSocketChannel} method of the system-wide default {@link
        /// java.nio.channels.spi.SelectorProvider} object.  </para>
        /// </summary>
        /// <returns>  A new socket channel
        /// </returns>
        /// <exception cref="IOException">
        ///          If an I/O error occurs </exception>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public static SocketChannel open() throws java.io.IOException
        public static SocketChannel Open()
        {
            return(SelectorProvider.Provider().OpenSocketChannel());
        }
Beispiel #2
0
        /// <summary>
        /// Opens a selector.
        ///
        /// <para> The new selector is created by invoking the {@link
        /// java.nio.channels.spi.SelectorProvider#openSelector openSelector} method
        /// of the system-wide default {@link
        /// java.nio.channels.spi.SelectorProvider} object.  </para>
        /// </summary>
        /// <returns>  A new selector
        /// </returns>
        /// <exception cref="IOException">
        ///          If an I/O error occurs </exception>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public static Selector open() throws java.io.IOException
        public static Selector Open()
        {
            return(SelectorProvider.Provider().OpenSelector());
        }
        /// <summary>
        /// Opens a datagram channel.
        ///
        /// <para> The {@code family} parameter is used to specify the {@link
        /// ProtocolFamily}. If the datagram channel is to be used for IP multicasting
        /// then this should correspond to the address type of the multicast groups
        /// that this channel will join.
        ///
        /// </para>
        /// <para> The new channel is created by invoking the {@link
        /// java.nio.channels.spi.SelectorProvider#openDatagramChannel(ProtocolFamily)
        /// openDatagramChannel} method of the system-wide default {@link
        /// java.nio.channels.spi.SelectorProvider} object.  The channel will not be
        /// connected.
        ///
        /// </para>
        /// </summary>
        /// <param name="family">
        ///          The protocol family
        /// </param>
        /// <returns>  A new datagram channel
        /// </returns>
        /// <exception cref="UnsupportedOperationException">
        ///          If the specified protocol family is not supported. For example,
        ///          suppose the parameter is specified as {@link
        ///          java.net.StandardProtocolFamily#INET6 StandardProtocolFamily.INET6}
        ///          but IPv6 is not enabled on the platform. </exception>
        /// <exception cref="IOException">
        ///          If an I/O error occurs
        ///
        /// @since   1.7 </exception>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public static DatagramChannel open(java.net.ProtocolFamily family) throws java.io.IOException
        public static DatagramChannel Open(ProtocolFamily family)
        {
            return(SelectorProvider.Provider().OpenDatagramChannel(family));
        }
Beispiel #4
0
        /// <summary>
        /// Opens a pipe.
        ///
        /// <para> The new pipe is created by invoking the {@link
        /// java.nio.channels.spi.SelectorProvider#openPipe openPipe} method of the
        /// system-wide default <seealso cref="java.nio.channels.spi.SelectorProvider"/>
        /// object.  </para>
        /// </summary>
        /// <returns>  A new pipe
        /// </returns>
        /// <exception cref="IOException">
        ///          If an I/O error occurs </exception>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public static Pipe open() throws java.io.IOException
        public static Pipe Open()
        {
            return(SelectorProvider.Provider().OpenPipe());
        }
        /// <summary>
        /// Opens a datagram channel.
        ///
        /// <para> The new channel is created by invoking the {@link
        /// java.nio.channels.spi.SelectorProvider#openDatagramChannel()
        /// openDatagramChannel} method of the system-wide default {@link
        /// java.nio.channels.spi.SelectorProvider} object.  The channel will not be
        /// connected.
        ///
        /// </para>
        /// <para> The <seealso cref="ProtocolFamily ProtocolFamily"/> of the channel's socket
        /// is platform (and possibly configuration) dependent and therefore unspecified.
        /// The <seealso cref="#open(ProtocolFamily) open"/> allows the protocol family to be
        /// selected when opening a datagram channel, and should be used to open
        /// datagram channels that are intended for Internet Protocol multicasting.
        ///
        /// </para>
        /// </summary>
        /// <returns>  A new datagram channel
        /// </returns>
        /// <exception cref="IOException">
        ///          If an I/O error occurs </exception>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public static DatagramChannel open() throws java.io.IOException
        public static DatagramChannel Open()
        {
            return(SelectorProvider.Provider().OpenDatagramChannel());
        }