Package java.net

Examples of java.net.SocketException


  private DatagramSocket checkSocket() throws IOException
  {
    DatagramSocket s = socket;
    if (s == null || s.isClosed())
      throw new SocketException( "socket closed" );
    return s;
  }
View Full Code Here


  protected final Socket checkSocket() throws SocketException
  {
    Socket s = socket;
   
    if (s == null)
      throw new SocketException( "socket closed" );
   
    if (s.isClosed())
      throw new SocketException( "socket closed" );
   
    return s;
  }
View Full Code Here

                }
                try {
                    if (timeout > 0) {
                        long remaining = timeout - (System.currentTimeMillis() - startTime);
                        if (remaining <= 0) {
                            throw new SocketException("timeout");
                        }
                        dataAvailable.await(remaining, TimeUnit.MILLISECONDS);
                    } else {
                        dataAvailable.await();
                    }
View Full Code Here

    {
        SSLSocket asock = null;
        try {
             asock = (SSLSocket)socket.accept();
        } catch (SSLException e){
          throw new SocketException("SSL handshake error" + e.toString());
        }
        return asock;
    }
View Full Code Here

      while ((inputLine = br.readLine()) != null) {
        LOG.error("PipesApp Error: " + inputLine);
      }
      br.close();

      throw new SocketException(
          "Timout: Client pipes application did not connect!");
    }
  }
View Full Code Here

      while ((inputLine = br.readLine()) != null) {
        LOG.error("PipesApp Error: " + inputLine);
      }
      br.close();

      throw new SocketException(
          "Timout: Client pipes application did not connect!");
    }
  }
View Full Code Here

  protected final Socket checkSocket() throws SocketException
  {
    Socket s = socket;
   
    if (s == null)
      throw new SocketException( "socket closed" );
   
    if (s.isClosed())
      throw new SocketException( "socket closed" );
   
    return s;
  }
View Full Code Here

 
  private ServerSocket checkSocket() throws IOException
  {
    ServerSocket ss = serverSocket;
    if (ss == null)
      throw new SocketException( "socket closed" );
    return ss;
  }
View Full Code Here

 
  private SSLServerSocket checkSocket() throws IOException
  {
    SSLServerSocket ss = sslServerSocket;
    if (ss == null)
      throw new SocketException( "socket closed" );
    return ss;
  }
View Full Code Here

  public Object getOption(int optID) throws SocketException {
        if (optID == SocketOptions.SO_SNDBUF)
            return new Integer(1024);
        else
        throw new SocketException("SSHSocketImpl does not implement getOption for " + optID);
  }
View Full Code Here

TOP

Related Classes of java.net.SocketException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.