Code example for Socket

Methods: isConnectedisOutputShutdown

0
            @Override 
            public void onClick(View v)
            { 
                // TODO Auto-generated method stub 
                String msg = ed_msg.getText().toString();
                if (null != socket && socket.isConnected())
                { 
                    if (!socket.isOutputShutdown())
                    { 
                        out.println(msg);
                    } 
                } 
                new Thread(SocketClientActivity.this).start();
            } 
        }); 
    } 
 
    public void ShowDialog(String msg)
    { 
        new AlertDialog.Builder(this).setTitle("notification").setMessage(msg)
Stop searching for code, let great code find you!  Add Codota to your java IDE