Esempio n. 1
0
 public string read_raw_response(Event ev,string raw)
 {
     /*
     Extracts raw response from raw buffer and length based on Event Content-Length.
     Returns raw string or None if not found.
     */
     int length = ev.GetContentLength();
     if (length > 0 && !string.IsNullOrEmpty(raw))
     return raw.Substring(raw.Length - length, length);
     return raw;
 }
Esempio n. 2
0
 public string read_raw(Event ev)
 {
     /*
     Reads raw data based on Event Content-Length.
     Returns raw string or None if not found.
     */
     int length = ev.GetContentLength();
     //# Reads length bytes if length > 0
     if (length >0)
     return transport.read(length);
     return string.Empty;
 }