package com.example.helloandroid; /* * This thread is responsible for interacting with the server. It waits to receive messages from the server and then handles them. */ public class ClientThread extends Connection { private Game main; public ClientThread(String ip, int port, Game main) { super(ip, port, "ClientThread"); this.main = main; } protected void processMessage(MessageType type, String input) { } protected void connectionStart() { main.mThread.connMessage = "Connection Started"; } protected void connectionSuccess() { main.mThread.connMessage = "Connected to Server"; sendMessage(MessageType.Info, "Yo, youze beeze gay!"); } protected void connectionFailure(String str) { main.mThread.connMessage = "Server not found"; main.mThread.connMessage = str; } protected void connectionBreak() { main.mThread.connMessage = "Your connection was interrupted"; } protected void peerDisconnect() { main.mThread.connMessage = "The server disconnected"; } protected void connectionEnd() { } }