use of com.zx.sms.codec.smpp.msg.BaseBindResp in project SMSGate by Lihuanghe.
the class SMPPSessionLoginManager method doLoginSuccess.
@Override
protected void doLoginSuccess(ChannelHandlerContext ctx, EndpointEntity entity, Object message) {
// 发送bind请求
SMPPEndpointEntity smppentity = (SMPPEndpointEntity) entity;
BaseBind bind = (BaseBind) message;
BaseBindResp resp = (BaseBindResp) bind.createResponse();
resp.setSystemId(bind.getSystemId());
ctx.channel().writeAndFlush(resp);
}
use of com.zx.sms.codec.smpp.msg.BaseBindResp in project SMSGate by Lihuanghe.
the class SMPPSessionLoginManager method validServermsg.
@Override
protected int validServermsg(Object message) {
if (message instanceof BaseBindResp) {
BaseBindResp resp = (BaseBindResp) message;
Tlv scInterfaceVersion = resp.getOptionalParameter(SmppConstants.TAG_SC_INTERFACE_VERSION);
if (scInterfaceVersion != null) {
try {
byte tempInterfaceVersion = scInterfaceVersion.getValueAsByte();
logger.info("Server support version : {}", tempInterfaceVersion);
} catch (TlvConvertException e) {
logger.warn("Unable to convert sc_interface_version to a byte value: {}", e.getMessage());
}
}
return resp.getCommandStatus();
} else {
logger.error("connect msg type error : {}", message);
return 9;
}
}
Aggregations