Search in sources :

Example 1 with PacketOutSendScreenLine

use of de.dytanic.cloudnetwrapper.network.packet.out.PacketOutSendScreenLine in project CloudNet by Dytanic.

the class ScreenLoader method run.

@Override
public void run() {
    this.thread = Thread.currentThread();
    String input;
    BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(screenable.getInstance().getInputStream(), StandardCharsets.UTF_8));
    try {
        while ((input = bufferedReader.readLine()) != null) {
            CloudNetWrapper.getInstance().getNetworkConnection().sendPacket(new PacketOutSendScreenLine(Arrays.asList(new ScreenInfo(screenable.getServiceId(), input))));
        }
    } catch (IOException e) {
    }
}
Also used : PacketOutSendScreenLine(de.dytanic.cloudnetwrapper.network.packet.out.PacketOutSendScreenLine) ScreenInfo(de.dytanic.cloudnet.lib.server.screen.ScreenInfo)

Aggregations

ScreenInfo (de.dytanic.cloudnet.lib.server.screen.ScreenInfo)1 PacketOutSendScreenLine (de.dytanic.cloudnetwrapper.network.packet.out.PacketOutSendScreenLine)1