Python - - Any abstract Base class for a networking client suggestions?

Hi, in Python
It is not totally obvious, to me, how my abstract bass class for my RTS client should look... Threading included
In Java, it is as below, what would it look like in Python? processNewGameState() is the abstract method
Thread - Do I make my own method called run and call it from the __main__ region?

import java.io.*;
import java.net.*;
import java.util.Random;


public abstract class GSclient extends Thread{

int clientCount=0;
	int clientCountExpected;	
	public static int SERVER_PORT_BASE=1027;
	public static byte MSG_HELO=1;
	public static byte MSG_START=5;
	public static byte IN_GAME_MSG=4;
	public static byte GAME_MSG_MOVE=8;
	public static byte GAME_MSG_CREATE=16;
	public static int MSG_SIZE = 4098;

	public abstract void processNewGameState();
	public GSclient(int cliNum, InetAddress serveraddress) {
		
		clientNumber=cliNum;
		serverAddress= serveraddress;
		
		start();
	}

Open in new window


My run() Thread method will receive incoming game-state messages and call the process method on each.
I assume the TCP and UDP receiving and analyzing code won't be too out-there
I can do the client networking, no problem.

Thanks
beavoidAsked:
Who is Participating?
 
beavoidAuthor Commented:
Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.