BrandonPotter / SimpleTCP

Straightforward .NET library to handle the repetitive tasks of spinning up and working with TCP sockets (client and server).
Apache License 2.0
363 stars 108 forks source link

How to send Ctrl+A to the client to start session #71

Open bryanp-ramosoil opened 3 years ago

bryanp-ramosoil commented 3 years ago

I'm writing a program to monitor tank monitors and there is a handshake that's needed. It's a RAW socket that needs the key combination (Ctrl+A) to initiate the session.

How is that done with your library?

Thanks!

GroophyLifefor commented 3 years ago

private void Form1_KeyDown(object sender, KeyEventArgs e) { if (e.Control && e.KeyCode == Keys.A) { SimpleTcpClient client = new SimpleTcpClient().Connect("127.0.0.1", 8910); } }

bryanp-ramosoil commented 3 years ago

Thanks for the response but the command needs to be send via code. There's no user interaction for this program so I would be unable to capture the KeyDown event.

Thanks again!