void afterNextPacket() {
		__s.get8();
		/*
		 * if (first) { GWT.log("position:" + __s.getPosition() + " end:" +
		 * __s.getEnd()); byte[] b = new byte[__s.getEnd()];
		 * __s.copyToByteArray(b, 0, 0, b.length); GWT.log("first done: " +
		 * Base64.encodeBase64String(b)); }
		 */

		__type[0] = __s.get8();
		/*
		 * GWT.log("Not confirmed:" + Integer.toBinaryString(__type[0]));
		 * GWT.log("Not confirmed:" +
		 * Integer.toBinaryString(CONNECTION_CONFIRM));
		 */
		if (__type[0] == DATA_TRANSFER) {
			// logger.debug("Data Transfer Packet");
			__s.incrementPosition(1); // eot
			// return __s;
		} else
			__s.incrementPosition(5); // dst_ref, src_ref, class
		if (first) {

			if (__type[0] != CONNECTION_CONFIRM) {
				rdpsock.close();
				GWT.log("Not confirmed:" + Integer.toHexString(__type[0]));
				return;
			}
			first = false;
		}

		GWT.log("calling rdpreceivedEvent");
		eventBus.fireEvent(events.removeFirst());
		if(!events.isEmpty())
		{
			try {
				nextPacket();
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (RdesktopException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (OrderException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (CryptoException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
		// return __s;

	}