use of com.tvd12.ezyfoxserver.command.EzyResponse in project ezyfox-server by youngmonkeys.
the class EzyHandshakeController method handle.
@SuppressWarnings("AbbreviationAsWordInName")
@Override
public void handle(EzyServerContext ctx, EzyHandShakeRequest request) {
EzySession session = request.getSession();
EzyHandshakeParams params = request.getParams();
EzyHandshakeEvent event = newHandshakeEvent(session, params);
ctx.handleEvent(EzyEventType.CLIENT_HANDSHAKE, event);
handleSocketSSL(ctx, event);
updateSession(session, event);
EzyResponse response = newHandShakeResponse(session, event);
ctx.send(response, session, false);
event.release();
}
use of com.tvd12.ezyfoxserver.command.EzyResponse in project ezyfox-server by youngmonkeys.
the class EzyHandshakeController method newHandShakeResponse.
protected EzyResponse newHandShakeResponse(EzySession session, EzyHandshakeEvent event) {
EzyHandShakeParams params = new EzyHandShakeParams();
params.setServerPublicKey(session.getPublicKey());
params.setReconnectToken(session.getToken());
params.setSessionId(session.getId());
params.setSessionKey(event.getEncryptedSessionKey());
return new EzyHandShakeResponse(params);
}
use of com.tvd12.ezyfoxserver.command.EzyResponse in project ezyfox-server by youngmonkeys.
the class EzyAppSendResponseImpl method newResponse.
protected EzyResponse newResponse(EzyData data) {
EzyAppSetting setting = context.getApp().getSetting();
EzyRequestAppResponseParams params = new EzyRequestAppResponseParams();
params.setAppId(setting.getId());
params.setData(data);
return new EzyRequestAppResponse(params);
}
use of com.tvd12.ezyfoxserver.command.EzyResponse in project ezyfox-server by youngmonkeys.
the class EzyAppSendResponseImpl method execute.
@Override
public void execute(EzyData data, Collection<EzySession> recipients, boolean encrypted, EzyTransportType transportType) {
EzyResponse response = newResponse(data);
serverContext.send(response, recipients, encrypted, transportType);
}
use of com.tvd12.ezyfoxserver.command.EzyResponse in project ezyfox-server by youngmonkeys.
the class EzyCloseSessionImpl method newResponse.
protected EzyResponse newResponse(EzyConstant reason) {
EzyDisconnectParams params = new EzyDisconnectParams();
params.setReason(reason);
return new EzyDisconnectResponse(params);
}
Aggregations