@Override
	public P2PMessage parseP2PMessage(String command, InputBuffer buffer) throws ParsingException, IOException {
		switch (command) {
		case VersionMessage.COMMAND:
			return new VersionMessage(buffer, this);
		case VerackMessage.COMMAND:
			return new VerackMessage(buffer, this);
		case AddrMessage.COMMAND:
			return new AddrMessage(buffer, this);
		case InvMessage.COMMAND:
			return new InvMessage(buffer, this);
		case GetdataMessage.COMMAND:
			return new GetdataMessage(buffer, this);
		case GetpubkeyMessage.COMMAND:
			return new GetpubkeyMessage(buffer, this);
		case PubkeyMessage.COMMAND:
			return new PubkeyMessage(buffer, this);
		case MsgMessage.COMMAND:
			return new MsgMessage(buffer, this);
		case UnencryptedBroadcastMessage.COMMAND:
			return new UnencryptedBroadcastMessage(buffer, this);
		default:
			throw new ParsingException("Unknown command: " + command);
		}
	}