Example #1
0
 public async Task SendMessageAsync([NotNull] JfpMessage message)
 {
     if (_streamReader == null)
     {
         throw new NotSupportedException("Underlying stream does not support writing.");
     }
     await _streamWriter.WriteLineAsync(JsonConvert.SerializeObject(message));
 }
Example #2
0
 public void SendMessage([NotNull] JfpMessage message)
 {
     if (_streamWriter == null)
     {
         throw new NotSupportedException("Underlying stream does not support writing.");
     }
     _streamWriter.WriteLine(JsonConvert.SerializeObject(message));
 }