try {
    Socket skCliente = new Socket( "127.0.0.1" , port );

    OutputStream aux = skCliente.getOutputStream();
    DataOutputStream flujo= new DataOutputStream( aux );

    InputStream auxin = skCliente.getInputStream();
    DataInputStream flujoin= new DataInputStream( auxin );

    flujo.write( new String(" { msg: '0', nick:'Client "+id+"', gps: ['3333','55555'] }\n").getBytes() );
    flujo.write( new String(" { msg:'3', text:'Holaps "+id+"' }\n").getBytes() );

    flujo.flush();

    while (true) {
		System.out.println( "[log: Cliente "+id+":"+flujoin.readLine()+"]" );
		}
} catch( Exception ex ) { ex.printStackTrace(); }