See code myServerSocket.onconnection = .... on line 821.