use of com.zx.sms.connect.manager.smpp.SMPPEndpointEntity in project SMSGate by Lihuanghe.
the class SMPPSessionLoginManager method doLogin.
@Override
protected void doLogin(Channel ch) {
// 发送bind请求
SMPPEndpointEntity smppentity = (SMPPEndpointEntity) entity;
BaseBind bind = createBindRequest(smppentity);
ch.writeAndFlush(bind);
}
use of com.zx.sms.connect.manager.smpp.SMPPEndpointEntity 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.connect.manager.smpp.SMPPEndpointEntity in project SMSGate by Lihuanghe.
the class SMPPSessionLoginManager method validClientMsg.
@Override
protected int validClientMsg(EndpointEntity entity, Object msg) {
SMPPEndpointEntity smppentity = (SMPPEndpointEntity) entity;
BaseBind message = (BaseBind) msg;
if (smppentity.getSystemId().equals(message.getSystemId()) && smppentity.getPassword().equals(message.getPassword())) {
return 0;
} else {
return 3;
}
}
Aggregations