Commit 853b9ba8 authored by Lily Tsai's avatar Lily Tsai

sh

parent 7199bdbb
......@@ -4,6 +4,7 @@ import android.content.Context;
import android.net.nsd.NsdManager;
import android.net.nsd.NsdServiceInfo;
import android.os.Handler;
import android.util.Log;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.apache.commons.lang3.tuple.Pair;
......@@ -30,6 +31,7 @@ import static org.mpisws.encounters.encounterformation.simulator.SimulatorEncoun
import static org.mpisws.helpers.Utils.SHA1;
public class SimulationServer {
private static final String TAG = SimulationServer.class.getSimpleName();
static private int port;
static private String mServiceName = "EbCSimulator";
static private String mServiceType = "_ebcsimulator._tcp";
......@@ -159,11 +161,12 @@ public class SimulationServer {
// resolve a conflict, so update the name you initially requested
// with the name Android actually used.
mServiceName = NsdServiceInfo.getServiceName();
Log.d(TAG, "Registration success " + mServiceName);
}
@Override
public void onRegistrationFailed(NsdServiceInfo serviceInfo, int errorCode) {
// Registration failed! Put debugging code here to determine why.
Log.d(TAG, "Registration failed " + errorCode);
}
@Override
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment