Emveepee.Widgets.ProfilerSocket.SendCommand C# (CSharp) Method

SendCommand() private method

private SendCommand ( string cmd ) : string
cmd string
return string
        string SendCommand(string cmd)
        {
            byte[] buffer = System.Text.Encoding.ASCII.GetBytes (cmd);
            NetworkStream stream = Stream;
            stream.Write (buffer, 0, buffer.Length);
            buffer = new byte [1024];
            int cnt = stream.Read (buffer, 0, buffer.Length);
            return System.Text.Encoding.ASCII.GetString (buffer, 0, cnt);
        }