Android LocalSocketAddress - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android LocalSocketAddress class.

This code example shows how to use the following methods:
        } 
        Slog.i(TAG, "connecting...");
        try { 
            mSocket = new LocalSocket();
 
            LocalSocketAddress address = new LocalSocketAddress("installd",
                    LocalSocketAddress.Namespace.RESERVED);
 
            mSocket.connect(address);
 
            mIn = mSocket.getInputStream();
            mOut = mSocket.getOutputStream();
        } catch (IOException ex) {
            disconnect(); 
            return false; 
        } 
        return true; 
    } 
 
    private void disconnect() { 
7
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
 
	public boolean InitLoop(int recvBufferSize, int sendBufferSize)
	{		 
        receiver = new LocalSocket();
		try { 
			receiver.connect(new LocalSocketAddress(localAddress));
			receiver.setReceiveBufferSize(recvBufferSize);
			//receiver.setSendBufferSize(512); 
			sender = lss.accept();
			//sender.setReceiveBufferSize(512); 
			sender.setSendBufferSize(sendBufferSize);
		} catch (IOException e) {
			e.printStackTrace();
			return false; 
		}		 
		isConnected_ = true;
        return true; 
	} 
 
    public boolean isConnected() { 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
        } 
        Slog.i(TAG, "connecting...");
        try { 
            mSocket = new LocalSocket();
 
            LocalSocketAddress address = new LocalSocketAddress("installd",
                    LocalSocketAddress.Namespace.RESERVED);
 
            mSocket.connect(address);
 
            mIn = mSocket.getInputStream();
            mOut = mSocket.getOutputStream();
        } catch (IOException ex) {
            disconnect(); 
            return false; 
        } 
        return true; 
    } 
 
    private void disconnect() { 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
        } 
        Log.i(TAG, "connecting...");
        try { 
            mSocket = new LocalSocket();
 
            LocalSocketAddress address = new LocalSocketAddress(
                "installd", LocalSocketAddress.Namespace.RESERVED);
 
            mSocket.connect(address);
 
            mIn = mSocket.getInputStream();
            mOut = mSocket.getOutputStream();
        } catch (IOException ex) {
            disconnect(); 
            return false; 
        } 
        return true; 
    } 
 
	private void disconnect() { 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
        int buffersize = 500000;
        try 
        { 
            // open local server socket and connect with receiving socket 
            lss = new LocalServerSocket("librtp-" + id);
            receiver.connect(new LocalSocketAddress("librtp-" + id));
 
            // Set receiver buffer sizes 
            receiver.setReceiveBufferSize(buffersize);
            receiver.setSendBufferSize(buffersize);
 
            // Connect the server and receiver sockets 
            sender = lss.accept();
 
            // Set sender buffer 
            sender.setReceiveBufferSize(buffersize);
            sender.setSendBufferSize(buffersize);
            id++;
        } catch (IOException e1)
        { 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
        } 
        Slog.i(TAG, "connecting...");
        try { 
            mSocket = new LocalSocket();
 
            LocalSocketAddress address = new LocalSocketAddress(
                "installd", LocalSocketAddress.Namespace.RESERVED);
 
            mSocket.connect(address);
 
            mIn = mSocket.getInputStream();
            mOut = mSocket.getOutputStream();
        } catch (IOException ex) {
            disconnect(); 
            return false; 
        } 
        return true; 
    } 
 
	private void disconnect() { 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
 
	public abstract String generateSessionDescription()  throws IllegalStateException, IOException;
 
	private void createSockets() throws IOException { 
		mReceiver = new LocalSocket();
		mReceiver.connect( new LocalSocketAddress("net.majorkernelpanic.librtp-" + mSocketId ) );
		mReceiver.setReceiveBufferSize(500000);
		mSender = mLss.accept();
		mSender.setSendBufferSize(500000); 
	} 
 
	private void closeSockets() { 
		try { 
			mSender.close();
			mReceiver.close();
		} catch (Exception ignore) {}
	} 
 
	/**  
	 * Releases ressources associated with the stream.  
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
	 
	public abstract String generateSessionDescriptor()  throws IllegalStateException, IOException;
	 
	private void createSockets() throws IOException { 
		receiver = new LocalSocket();
		receiver.connect( new LocalSocketAddress("net.majorkernelpanic.librtp-" + socketId ) );
		receiver.setReceiveBufferSize(500000);
		receiver.setSendBufferSize(500000);
		sender = lss.accept();
		sender.setReceiveBufferSize(500000);
		sender.setSendBufferSize(500000); 
	} 
	 
	private void closeSockets() { 
		try { 
			sender.close();
			receiver.close();
		} catch (Exception ignore) {}
	} 
	 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
	 
	public abstract String generateSessionDescriptor()  throws IllegalStateException, IOException;
	 
	private void createSockets() throws IOException { 
		receiver = new LocalSocket();
		receiver.connect( new LocalSocketAddress("com.ron.camanon.librtp-" + socketId ) );
		receiver.setReceiveBufferSize(500000);
		sender = lss.accept();
		sender.setSendBufferSize(500000); 
	} 
	 
	private void closeSockets() { 
		try { 
			sender.close();
			receiver.close();
		} catch (Exception ignore) {}
	} 
	 
	public void release() { 
		stop(); 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
	public void prepare() throws IllegalStateException,IOException { 
		 
		receiver = new LocalSocket();
		try { 
			lss = new LocalServerSocket("librtp-"+id);
			receiver.connect(new LocalSocketAddress("librtp-"+id));
			receiver.setReceiveBufferSize(500000);
			receiver.setSendBufferSize(500000);
			sender = lss.accept();
			sender.setReceiveBufferSize(500000);
			sender.setSendBufferSize(500000); 
			id++;
		} catch (IOException e1) {
			throw new IOException("Can't create local socket !");
		} 
		 
		setOutputFile(sender.getFileDescriptor());
		 
		try { 
			super.prepare(); 
4
CodeRank
Experience pair programming with AI  Get Codota for Java

Related Android LocalSocketAddress Questions & Answers:

See Code Examples for Android LocalSocketAddress Methods: