void call() {
		CharBuffer hdrbuf;
		CharBuffer msgbuf;
		CoderResult cr;
		int off, r;
		byte[] buf;
		try {
			Socket s = new Socket(addr,port);
			OutputStream out = s.getOutputStream();
			InputStream in = s.getInputStream();

			if (trace_io) {
				System.err.println("--------- xmit -----------");
				System.err.print(hdr);
				System.err.print(msg);
			}

 			buf = bb.array();

			/* to keep things simple, the headers must fit in one pass */
			bb.clear();
			encoder.reset();
			hdrbuf = CharBuffer.wrap(hdr);
			cr = encoder.encode(hdrbuf, bb, false);
			if (cr != CoderResult.UNDERFLOW)
				throw new Exception("encoder failed (1)");	

			msgbuf = CharBuffer.wrap(msg);
			do {
				cr = encoder.encode(msgbuf, bb, true);
				if (cr.isError())
					throw new Exception("encoder failed (2)");
				out.write(buf, 0, bb.position());
				bb.clear();
			} while (cr == CoderResult.OVERFLOW);


			/* read reply */
			for (off = 0;;off += r) {
				r = in.read(buf, off, buf.length-off);
				if (r <= 0)
					break;
			}
			bb.limit(off);

			s.close();
			if (trace_io) {
				System.err.println("--------- recv -----------");
				System.err.println(new String(buf, 0, off));
				System.err.println("--------- done -----------");
			}
		} catch (Exception x) {
			System.out.println("OOPS: " + x.getMessage());
			x.printStackTrace();
		}
	}