WIP bug fix
This commit is contained in:
1 parent
57059c3ef0
commit
ba2f41daf7
14 files changed
+72
-78
No files matched your search
@@ -5,13 +5,14 @@ import GUI.SocketTestWindow;
|
||||
import net.TestMessage;
|
||||
import pitiupi.GUI.MainWindow;
|
||||
import pitiupi.net.Message;
|
||||
import pitiupi.plugin.Plugin;
|
||||
import pitiupi.net.tcp.TcpConnection;
|
||||
import pitiupi.plugin.PrivateConnectionPlugin;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectInputStream;
|
||||
|
||||
public class SocketTest implements Plugin{
|
||||
public class SocketTest implements PrivateConnectionPlugin{
|
||||
SocketTestWindow socketTestWindow;
|
||||
|
||||
@Override
|
||||
@@ -29,6 +30,11 @@ public class SocketTest implements Plugin{
|
||||
return "0";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getIdentifier() {
|
||||
return "Socket.Test.123456";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createPlugin(MainWindow mainWindow) {
|
||||
this.socketTestWindow = new SocketTestWindow(mainWindow);
|
||||
@@ -41,8 +47,8 @@ public class SocketTest implements Plugin{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void receiveMessage(byte[] bytes) {
|
||||
ByteArrayInputStream bis = new ByteArrayInputStream(bytes);
|
||||
public void receiveMessage(byte[] message) {
|
||||
ByteArrayInputStream bis = new ByteArrayInputStream(message);
|
||||
ObjectInputStream ois;
|
||||
try {
|
||||
ois = new ObjectInputStream(bis);
|
||||
@@ -53,4 +59,19 @@ public class SocketTest implements Plugin{
|
||||
System.out.println(ex.toString());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void receivePrivateConnection(TcpConnection tcpConnection) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void receiveBytes(TcpConnection connection, byte[] bytes) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSocketClosed(TcpConnection tcpConnection) {
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user