WIP bug fix
This commit is contained in:
1 parent
57059c3ef0
commit
ba2f41daf7
14 files changed
+72
-78
No files matched your search
@@ -8,7 +8,7 @@ public class SocketTestMenu extends JMenu {
|
||||
|
||||
public SocketTestMenu(SocketTestWindow socketTestWindow) {
|
||||
this.socketTestWindow = socketTestWindow;
|
||||
this.setText("Chat");
|
||||
this.setText("MP-Chat");
|
||||
JMenuItem menuItem = new JMenuItem();
|
||||
menuItem.setText("Show Chat Window");
|
||||
menuItem.addActionListener(this::showTestWindow);
|
||||
|
||||
@@ -96,7 +96,7 @@ public class SocketTestWindow extends JFrame {
|
||||
try {
|
||||
TestMessage msg = createMessage("TCP Unicast");
|
||||
InetAddress ip = InetAddress.getByName(ipField.getText());
|
||||
mainWindow.getSocketTCP().send(msg.toByteArray(), ip);
|
||||
mainWindow.getSocketTCP().send(msg, ip);
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(MainWindow.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
@@ -106,7 +106,7 @@ public class SocketTestWindow extends JFrame {
|
||||
try {
|
||||
TestMessage msg = createMessage("UDP Unicast");
|
||||
InetAddress ip = InetAddress.getByName(ipField.getText());
|
||||
mainWindow.getSocketUDP().sendUnicast(msg.toByteArray(), ip);
|
||||
mainWindow.getSocketUDP().sendUnicast(msg, ip);
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(MainWindow.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
@@ -114,7 +114,7 @@ public class SocketTestWindow extends JFrame {
|
||||
public void sendMulticast() {
|
||||
try {
|
||||
TestMessage msg = createMessage("UDP Multicast");
|
||||
mainWindow.getSocketUDP().sendMulticast(msg.toByteArray());
|
||||
mainWindow.getSocketUDP().sendMulticast(msg);
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(MainWindow.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user