public void sendMessage(String message) throws IOException
{
// split message if it's too large
for (int i = 0; i < message.length(); i += 174) {
int end = Math.min(i + 174, message.length());
PublicMessage m = new PublicMessage(name,
message.substring(i, end));
m.setExceptionListener(this);
MessageHandler.send(server, m);
}
}