package com.faforever.client.relay;

import com.faforever.client.connectivity.ConnectivityState;
import com.faforever.client.legacy.domain.MessageTarget;

import java.net.InetSocketAddress;
import java.util.Arrays;

public class ConnectivityStateMessage extends GpgServerMessage {

  private static final int STATE_INDEX = 0;
  private static final int ADDRESS_INDEX = 1;

  public ConnectivityStateMessage(ConnectivityState state, InetSocketAddress socketAddress) {
    super(GpgServerMessageType.CONNECTIVITY_STATE, Arrays.asList(
        state, new Object[]{socketAddress.getHostName(), socketAddress.getPort()}
    ));
    setTarget(MessageTarget.CONNECTIVITY);
  }

  public ConnectivityState getState() {
    return (ConnectivityState) getArgs().get(STATE_INDEX);
  }

  public InetSocketAddress getSocketAddress() {
    @SuppressWarnings("unchecked")
    Object[] hostPort = (Object[]) getArgs().get(ADDRESS_INDEX);
    return new InetSocketAddress((String) hostPort[0], (int) hostPort[1]);
  }
}

@@ -539,16 +539,28 @@
    state
+.getString()
 , new Ob
@@ -727,17 +727,16 @@
  return 
-(
 Connecti
@@ -744,31 +744,37 @@
 ityState
-) getArgs().get
+.fromString(getString
 (STATE_I
@@ -774,24 +774,25 @@
 STATE_INDEX)
+)
 ;%0A  %7D%0A%0A  pub

Is it a string?