<commit_before>import java.net.DatagramSocket;


public class ServerSender extends Thread {
	private DatagramSocket serverSocket;
	public ServerSender(DatagramSocket serverSocket) {
		this.serverSocket = serverSocket;
	}
	@Override
	public void run() {
		
		super.run();
	}
	public void sendClientMsg(Client client, String msg){
		
	}
	public void braodcastGameState(Game game){
		
	}

}<commit_msg>Added functionality to serverSender, no longer threaded since it makes non-blocking calls.<commit_after>import java.io.IOException;
import java.net.*;


public class ServerSender {
	private DatagramSocket serverSocket;
	public ServerSender(DatagramSocket serverSocket) {
		this.serverSocket = serverSocket;
	}	
	public void sendClientMsg(Client client, String message){
		sendMsg(message, client.getIPaddr(), client.getPort());
	}
	
	public void broadcastMessage(Client[] clients, String message){	
		for (Client client : clients) {
			sendClientMsg(client, message);
		}
	}
	public void sendMsg(String message, InetAddress IP, int port){
		byte[] msg = message.getBytes();
		 DatagramPacket packet = new DatagramPacket(msg, msg.length, IP, port);
		try {
			serverSocket.send(packet);
		} catch (IOException e) {
			System.out.println("Error broadcasting message");
		}
	}
}
{'fraction_non_alphanumeric': 0.09968602825745683, 'fraction_numerical': 0.0, 'mean_word_length': 4.930232558139535, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1343824', 'n_tokens_mistral': 399, 'n_tokens_neox': 365, 'n_words': 103}