use of com.tvd12.ezyfoxserver.entity.EzySession in project ezyfox-server by youngmonkeys.
the class EzyAccessAppController method responseAccessAppError.
protected void responseAccessAppError(EzyServerContext ctx, EzySession session, EzyAccessAppException exception) {
EzyResponse response = newAccessAppErrorResponse(exception.getError());
ctx.send(response, session, false);
}
use of com.tvd12.ezyfoxserver.entity.EzySession 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.entity.EzySession 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.entity.EzySession 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.entity.EzySession in project ezyfox-server by youngmonkeys.
the class EzyPluginSendResponseImpl method execute.
@Override
public void execute(EzyData data, EzySession recipient, boolean encrypted, EzyTransportType transportType) {
EzyResponse response = newResponse(data);
serverContext.send(response, recipient, encrypted, transportType);
}
Aggregations