MinimalisticTelnet.TelnetConnection.Write C# (CSharp) Method

Write() public method

public Write ( string cmd ) : void
cmd string
return void
        public void Write(string cmd)
        {
            if (!tcpSocket.Connected) return;
            byte[] buf = System.Text.ASCIIEncoding.ASCII.GetBytes(cmd.Replace("\0xFF","\0xFF\0xFF"));
            tcpSocket.GetStream().Write(buf, 0, buf.Length);
        }