Package voxo.client.actions

Source Code of voxo.client.actions.CancelVoiceAction

package voxo.client.actions;

import java.io.IOException;
import java.net.UnknownHostException;
import java.util.EnumSet;

import voxo.client.controllers.ClientController;
import voxo.client.services.NetworkService;
import voxo.common.entities.Packet;
import voxo.common.enums.EnumPacket;
import voxo.common.enums.EnumVerbose;
import voxo.common.packets.VoiceConnexionPacket;

public class CancelVoiceAction {
  public CancelVoiceAction(ClientController c, String contactIp, VoiceConnexionPacket p) {
    try {
      NetworkService.sendPacket(contactIp, new Packet(EnumPacket.CLIENT_CancelVoice, p));
    } catch (UnknownHostException e) {
      c.getVerbose().addConsoleMsg(e, EnumSet.of(EnumVerbose.ToConsole, EnumVerbose.ToLog));
      new ServerErrorAction(c);
    } catch (IOException e) {
      c.getVerbose().addConsoleMsg(e, EnumSet.of(EnumVerbose.ToConsole, EnumVerbose.ToLog));
      new ServerErrorAction(c);
    }
  }
}
TOP

Related Classes of voxo.client.actions.CancelVoiceAction

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.