private void init() {

		if (client != null) {
			try {
				out = client.getOutputStream();
			} catch (IOException e) {
				// TODO Auto-generated catch block
				delegate.connectionFailed(e.getLocalizedMessage());
				return;
			}
			try {
				in = client.getInputStream();
			} catch (IOException e) {
				// TODO Auto-generated catch block
				delegate.connectionFailed(e.getLocalizedMessage());
				return;
			}
			
				try {
					while(in.available()>0){
					in.read();
					}
					
				} catch (IOException e) {
					// TODO Auto-generated catch block
					delegate.connectionFailed(e.getLocalizedMessage());
				}
			}
			startListenerThread();
			startWritingThread();
			delegate.startOnlineGame();

		}