package eu.jonahbauer.wizard.client.libgdx.state;

import eu.jonahbauer.wizard.client.libgdx.Client;
import eu.jonahbauer.wizard.common.machine.TimeoutState;
import eu.jonahbauer.wizard.common.messages.server.ServerMessage;

import java.util.Optional;

public interface ClientState extends TimeoutState<ClientState, Client> {
    Optional<ClientState> onOpen(Client client);
    
    Optional<ClientState> onMessage(Client client, ServerMessage message);
    
    Optional<ClientState> onClose(Client client, int code, String reason, boolean remote);
    
}
