/** * Create a WebSocket. * * <p> * This method is an alias of {@link #createSocket(URL, int) createSocket}{@code * (url, }{@link #getConnectionTimeout()}{@code )}. * </p> * * @param url * The URL of the WebSocket endpoint on the server side. * * @return * A WebSocket. * * @throws IllegalArgumentException * The given URL is {@code null} or failed to be converted into a URI. * * @throws IOException * Failed to create a socket. Or, HTTP proxy handshake or SSL * handshake failed. */ public WebSocket createSocket(URL url) throws IOException { return createSocket(url, getConnectionTimeout()); }
/** * Create a WebSocket. * * <p> * This method is an alias of {@link #createSocket(String, int) * createSocket}{@code (uri, }{@link #getConnectionTimeout()}{@code )}. * </p> * * @param uri * The URI of the WebSocket endpoint on the server side. * * @return * A WebSocket. * * @throws IllegalArgumentException * The given URI is {@code null} or violates RFC 2396. * * @throws IOException * Failed to create a socket. Or, HTTP proxy handshake or SSL * handshake failed. */ public WebSocket createSocket(String uri) throws IOException { return createSocket(uri, getConnectionTimeout()); }
return createSocket(uri, getConnectionTimeout());
/** * Create a WebSocket. * * <p> * This method is an alias of {@link #createSocket(String, int) * createSocket}{@code (uri, }{@link #getConnectionTimeout()}{@code )}. * </p> * * @param uri * The URI of the WebSocket endpoint on the server side. * * @return * A WebSocket. * * @throws IllegalArgumentException * The given URI is {@code null} or violates RFC 2396. * * @throws IOException * Failed to create a socket. Or, HTTP proxy handshake or SSL * handshake failed. */ public WebSocket createSocket(String uri) throws IOException { return createSocket(uri, getConnectionTimeout()); }
/** * Create a WebSocket. * * <p> * This method is an alias of {@link #createSocket(URL, int) createSocket}{@code * (url, }{@link #getConnectionTimeout()}{@code )}. * </p> * * @param url * The URL of the WebSocket endpoint on the server side. * * @return * A WebSocket. * * @throws IllegalArgumentException * The given URL is {@code null} or failed to be converted into a URI. * * @throws IOException * Failed to create a socket. Or, HTTP proxy handshake or SSL * handshake failed. */ public WebSocket createSocket(URL url) throws IOException { return createSocket(url, getConnectionTimeout()); }
return createSocket(uri, getConnectionTimeout());