Package org.newsclub.net.unix

Examples of org.newsclub.net.unix.AFUNIXSocketAddress


    final File socketFile = new File(args[0]);

    Socket sock = null;
    try {
      sock = AFUNIXSocket.newInstance();
      sock.connect(new AFUNIXSocketAddress(socketFile));

      DataInputStream in = null;
      try {
        in = new DataInputStream(sock.getInputStream());
View Full Code Here


      IOUtils.closeQuietly(in);
    }
  }

  public void open(File pipe) throws IOException {
    sock.connect(new AFUNIXSocketAddress(pipe));
    in = new DataInputStream(sock.getInputStream());
    out = new DataOutputStream(sock.getOutputStream());
  }
View Full Code Here

    File socketFile = new File(sPorta);
    if(!socketFile.exists())
      throw new IOException("Il file socket non esiste.");

    sock = AFUNIXSocket.newInstance();
    sock.connect(new AFUNIXSocketAddress(socketFile));

    // imposta gli stream di input/output
    setStream(sock.getInputStream(), sock.getOutputStream());
  }
View Full Code Here

       //Stop signal to the boss thread
       this.bossInstance.stop();
       //Send a dummy request to actually stop the thread.
       AFUNIXSocket sock = AFUNIXSocket.newInstance();
       try {
         sock.connect(new AFUNIXSocketAddress(this.socketFile));
       } catch (AFUNIXSocketException e) {
         logger.warn("Failed to connect to Socket while sending a stop request.");
       }
       //Close the socket
       channel.socket.close();
View Full Code Here

        this.socketFile = new File(new File(this.socketDir), this.socketName);

        //Create socket address
        LOGGER.info("Socket file: "+this.socketFile.getAbsolutePath());
        try {
            this.socketAddress = new AFUNIXSocketAddress(this.socketFile);
        } catch (IOException e) {
            throw new RuntimeException("Error creating Socket Address. ",e);
        }
        if (this.getServerExecutors() == null) { // no executors have been set for server listener
            if (this.getServerPoolSize() != UDSNettyServer.INVALID_POOL_SIZE) { // thread pool size has been set. create and use a fixed thread pool
View Full Code Here

        this.socketFile = new File(new File(this.socketDir), this.socketName);

        //Create socket address
        LOGGER.info("Socket file: "+this.socketFile.getAbsolutePath());
        try {
            this.socketAddress = new AFUNIXSocketAddress(this.socketFile);
            this.socket = AFUNIXServerSocket.newInstance();
            this.socket.bind(this.socketAddress);
        } catch (IOException e) {
            throw new RuntimeException("Error creating Socket Address. ",e);
        }
View Full Code Here

TOP

Related Classes of org.newsclub.net.unix.AFUNIXSocketAddress

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.