use of com.zx.sms.connect.manager.sgip.SgipEndpointEntity in project SMSGate by Lihuanghe.
the class SgipSessionLoginManager method doLogin.
@Override
protected void doLogin(Channel ch) {
// 发送bind请求
SgipEndpointEntity sgipentity = (SgipEndpointEntity) entity;
SgipBindRequestMessage bind = createBindRequest(sgipentity);
ch.writeAndFlush(bind);
}
use of com.zx.sms.connect.manager.sgip.SgipEndpointEntity in project SMSGate by Lihuanghe.
the class SgipSessionLoginManager method validClientMsg.
@Override
protected int validClientMsg(EndpointEntity entity, Object msg) {
SgipEndpointEntity sgipentity = (SgipEndpointEntity) entity;
SgipBindRequestMessage message = (SgipBindRequestMessage) msg;
if (sgipentity.getLoginName().equals(message.getLoginName()) && sgipentity.getLoginPassowrd().equals(message.getLoginPassowrd())) {
return 0;
} else {
return 1;
}
}
use of com.zx.sms.connect.manager.sgip.SgipEndpointEntity in project SMSGate by Lihuanghe.
the class SgipSessionLoginManager method doLoginSuccess.
@Override
protected void doLoginSuccess(ChannelHandlerContext ctx, EndpointEntity entity, Object message) {
// 发送bind请求
SgipEndpointEntity sgipentity = (SgipEndpointEntity) entity;
SgipBindResponseMessage resp = new SgipBindResponseMessage(((Message) message).getHeader());
resp.setResult((short) 0);
resp.setTimestamp(((Message) message).getTimestamp());
ctx.channel().writeAndFlush(resp);
}
Aggregations