public void Dispose() { interruptGrabbing = false; serverHandler = null; screenResponse = null; packetFactory = null; responsePacket = null; try { if (ScreenThread != null && ScreenThread.IsAlive) ScreenThread.Abort(); } catch { } mouseController.Dispose(); mouseController = null; keyboardController.Dispose(); keyboardController = null; commander.Dispose(); commander = null; screenGrabber.Dispose(); screenGrabber = null; if (nextScreen != null) nextScreen.Dispose(); if (prevScreen != null) prevScreen.Dispose(); if (difference != null) difference.Dispose(); GC.SuppressFinalize(this); }
public LdpPacket BuildPacket(LdpScreenResponse response) { var packet = LdpPacket.CreateBuilder(); packet.Type = PacketType.SCREEN_RESPONSE; packet.ScreenResponse = response; return packet.Build(); }
public LdpPacket BuildPacket(LdpScreenResponse response) { var packet = LdpPacket.CreateBuilder(); packet.Type = PacketType.SCREEN_RESPONSE; packet.ScreenResponse = response; return(packet.Build()); }
private void SendScreenResponse(byte[] compr, int len, LdpRectangle.Builder r) { screenResponse = null; responsePacket = null; screenResponse = packetFactory.SetScreenResponse(compr, len, r); responsePacket = packetFactory.BuildPacket(screenResponse); serverHandler.GetSenderChannel.Send(responsePacket); }
public LdpScreenResponse SetScreenResponse(byte[] compressed, int baseLenght, LdpRectangle.Builder rect) { var response = LdpScreenResponse.CreateBuilder(); ByteString bytes = ByteString.CopyFrom(compressed); response.CompressedScreen = bytes; response.BaseLenght = baseLenght; response.SetRect(rect); return(response.Build()); }
public void Dispose() { interruptGrabbing = false; serverHandler = null; screenResponse = null; packetFactory = null; responsePacket = null; try { if (ScreenThread != null && ScreenThread.IsAlive) { ScreenThread.Abort(); } } catch { } mouseController.Dispose(); mouseController = null; keyboardController.Dispose(); keyboardController = null; commander.Dispose(); commander = null; screenGrabber.Dispose(); screenGrabber = null; if (nextScreen != null) { nextScreen.Dispose(); } if (prevScreen != null) { prevScreen.Dispose(); } if (difference != null) { difference.Dispose(); } GC.SuppressFinalize(this); }
private void SendScreenResponse(byte[] compr, int len, LdpRectangle.Builder r) { screenResponse = null; responsePacket = null; screenResponse = packetFactory.SetScreenResponse(compr, len, r); responsePacket = packetFactory.BuildPacket(screenResponse); serverHandler.GetSenderChannel.Send(responsePacket); }