optimize codec base class from ProtocolCodec to IoFilterAdapter and fix send callback