package com.lqp.rudp;

import java.nio.ByteBuffer;

import com.lqp.rudp.msg.RudpMsgBase;

public abstract class RudpChlCallback implements RudpListener{
	private RudpListener outer;
	
	public RudpChlCallback(RudpListener l) {
		outer = l;
	}
	
	
	@Override
	public String name() {
		return outer.name();
	}
	
	@Override
	public void onSend(ByteBuffer b) {
		outer.onSend(b);
	}

	@Override
	public void onReceive(ByteBuffer b) {
		outer.onReceive(b);
	}

	@Override
	public void onPeerLost(long lastTime) {
		outer.onPeerLost(lastTime);
	}


	@Override
	public void logDebug(String s) {
		outer.logDebug(s);
	}



	@Override
	public void logWarn(String s) {
		outer.logWarn(s);
	}


	@Override
	public void logInfo(String s) {
		outer.logInfo(s);
	}

	@Override
	public void logError(String s) {
		outer.logError(s);
	}

	abstract RudpConfig getRudpConfig();
	abstract void sendChannelMsg(RudpMsgBase msg) throws Exception;
	abstract long getChlRtt();
	abstract long getChlRttVar();
	abstract long getActiveTime();
}
