Exemple #1
0
 public void skip_read(UInt32 len)
 {
     if (read_len + len > data_len)
       {
     error_code = error_code_t.stream_buffer_overflow;
     return;
       }
       read_len += (int)len;
       return;
 }
Exemple #2
0
 public void set_error_code(error_code_t ec)
 {
     error_code = ec;
 }
Exemple #3
0
 public void clear()
 {
     this.read_len = 0;
       this.write_len = 0;
       trace_info_count = 0;
       error_code = error_code_t.success;
 }
Exemple #4
0
 public zero_copy_buffer(byte[] buf , int size = -1)
 {
     if(size == -1)
       {
     size = buf.Length;
       }
       buffer = buf;
       data_len = buf.Length;
       read_len = 0;
       write_len = 0;
       value = new UType();
       this.trace_info_count = 0;
       trace_infos = new trace_info[64];
       error_code = error_code_t.success;
 }
Exemple #5
0
 public zero_copy_buffer()
 {
     buffer = new byte[65536];
       data_len = 65536;
       read_len = 0;
       write_len = 0;
       value = new UType();
       this.trace_info_count = 64;
       trace_infos = new trace_info[64];
       trace_build = new StringBuilder();
       error_code = error_code_t.success;
 }
Exemple #6
0
 public zero_copy_buffer(byte[] buf)
 {
     buffer = buf;
       data_len = buf.Length;
       read_len = 0;
       write_len = 0;
       value = new UType();
       this.trace_info_count = 64;
       trace_infos = new trace_info[64];
       error_code = error_code_t.success;
 }