diff --git a/compiler/cpp/src/thrift/generate/t_netstd_generator.cc b/compiler/cpp/src/thrift/generate/t_netstd_generator.cc
index 464ca6a..4a50e45 100644
--- a/compiler/cpp/src/thrift/generate/t_netstd_generator.cc
+++ b/compiler/cpp/src/thrift/generate/t_netstd_generator.cc
@@ -318,8 +318,8 @@
 }
 
 void t_netstd_generator::reset_indent() {
-  while( indent_count() > 0) { 
-    indent_down(); 
+  while( indent_count() > 0) {
+    indent_down();
   }
 }
 
@@ -578,7 +578,7 @@
 {
     out << indent();
     bool need_static_construction = !in_static;
-    
+
     type = resolve_typedef( type);
 
     if (!defval || needtype)
@@ -633,7 +633,7 @@
                 render << "System.Text.Encoding.UTF8.GetBytes(\"" << get_escaped_string(value) << "\")";
             } else {
                 render << '"' << get_escaped_string(value) << '"';
-            } 
+            }
             break;
         case t_base_type::TYPE_BOOL:
             render << ((value->get_integer() > 0) ? "true" : "false");
@@ -681,43 +681,43 @@
     for (m_iter = members.begin(); m_iter != members.end(); ++m_iter)
     {
         collect_extensions_types((*m_iter)->get_type());
-    }    
+    }
 }
 
 void t_netstd_generator::collect_extensions_types(t_type* ttype)
 {
     ttype = resolve_typedef( ttype);
     string key = type_name(ttype);
-    
+
     if (ttype->is_struct() || ttype->is_xception())
     {
         if( checked_extension_types.find(key) == checked_extension_types.end())
         {
             checked_extension_types[key] = ttype;    // prevent recursion
-            
+
             t_struct* tstruct = static_cast<t_struct*>(ttype);
             collect_extensions_types(tstruct);
         }
         return;
     }
-    
+
     if (ttype->is_map() || ttype->is_set() || ttype->is_list())
     {
         if( collected_extension_types.find(key) == collected_extension_types.end())
         {
             collected_extension_types[key] = ttype;   // prevent recursion
-            
+
             if( ttype->is_map())
             {
                 t_map* tmap = static_cast<t_map*>(ttype);
                 collect_extensions_types(tmap->get_key_type());
                 collect_extensions_types(tmap->get_val_type());
-            } 
+            }
             else if (ttype->is_set())
             {
                 t_set* tset = static_cast<t_set*>(ttype);
                 collect_extensions_types(tset->get_elem_type());
-            } 
+            }
             else if (ttype->is_list())
             {
                 t_list* tlist = static_cast<t_list*>(ttype);
@@ -772,7 +772,7 @@
         out << indent() << "return TCollections.Equals(instance, other);" << endl;
         scope_down(out);
         out << endl << endl;
-        
+
         out << indent() << "public static int GetHashCode(this " << iter->first << " instance)" << endl;
         scope_up(out);
         out << indent() << "return TCollections.GetHashCode(instance);" << endl;
@@ -796,7 +796,7 @@
                 string copy_val = get_deep_copy_method_call(tmap->get_val_type(), needs_typecast);
                 bool null_key = type_can_be_null(tmap->get_key_type());
                 bool null_val = type_can_be_null(tmap->get_val_type());
-                
+
                 out << indent() << "foreach (var pair in source)" << endl;
                 indent_up();
                 out << indent() << tmp_instance << ".Add(";
@@ -815,7 +815,7 @@
                 }
                 out << ");" << endl;
                 indent_down();
-                
+
             } else if( iter->second->is_set() || iter->second->is_list()) {
                 string copy_elm;
                 bool null_elm = false;
@@ -859,7 +859,7 @@
 void t_netstd_generator::generate_struct(t_struct* tstruct)
 {
     collect_extensions_types(tstruct);
-    
+
     if (is_union_enabled() && tstruct->is_union())
     {
         generate_netstd_union(tstruct);
@@ -904,7 +904,7 @@
     out << endl;
 
     generate_netstd_doc(out, tstruct);
-    collect_extensions_types(tstruct);    
+    collect_extensions_types(tstruct);
     prepare_member_name_mapping(tstruct);
 
     if ((is_serialize_enabled() || is_wcf_enabled()) && !is_exception)
@@ -1153,7 +1153,7 @@
     if( suppress_deepcopy) {
         return;  // feature disabled
     }
-        
+
     const vector<t_field*>& members = tstruct->get_members();
     vector<t_field*>::const_iterator m_iter;
 
@@ -1169,7 +1169,7 @@
         bool needs_typecast = false;
         t_type* ttype = (*m_iter)->get_type();
         string copy_op = get_deep_copy_method_call(ttype, needs_typecast);
-        
+
         bool is_required = field_is_required(*m_iter);
         generate_null_check_begin( out, *m_iter);
 
@@ -1187,7 +1187,7 @@
     }
 
     out << indent() << "return " << tmp_instance << ";" << endl;
-    
+
     indent_down();
     out << indent() << "}" << endl << endl;
 }
@@ -1300,34 +1300,34 @@
 void t_netstd_generator::generate_null_check_begin(ostream& out, t_field* tfield) {
     bool is_required = field_is_required(tfield);
     bool null_allowed = type_can_be_null(tfield->get_type());
-    
+
     if( null_allowed || (!is_required)) {
         bool first = true;
         out << indent() << "if(";
-        
+
         if( null_allowed) {
             out << "(" << prop_name(tfield) << " != null)";
             first = false;
         }
-    
+
         if( !is_required) {
             if( !first) {
                 out << " && ";
             }
             out << "__isset." << get_isset_name(normalize_name(tfield->get_name()));
         }
-        
+
         out << ")" << endl
             << indent() << "{" << endl;
         indent_up();
-    }        
+    }
 }
 
 
 void t_netstd_generator::generate_null_check_end(ostream& out, t_field* tfield) {
     bool is_required = field_is_required(tfield);
     bool null_allowed = type_can_be_null(tfield->get_type());
-    
+
     if( null_allowed || (!is_required)) {
         indent_down();
         out << indent() << "}" << endl;
@@ -1473,7 +1473,7 @@
     string tmpvar = tmp("tmp");
     out << indent() << "public override string ToString()" << endl
         << indent() << "{" << endl;
-    indent_up();	
+    indent_up();
     out << indent() << "var " << tmpvar << " = new StringBuilder(\"" << tstruct->get_name() << "(\");" << endl;
 
     const vector<t_field*>& fields = tstruct->get_members();
@@ -1580,7 +1580,7 @@
         indent_up();
         out << indent() << "return Equals(As_" << (*f_iter)->get_name() << ", other.As_" << (*f_iter)->get_name() << ");" << endl;
         indent_down();
-    }                
+    }
     out << indent() << "default:" << endl;
     indent_up();
     out << indent() << "return true;" << endl;
@@ -1595,7 +1595,7 @@
     indent_up();
     out << indent() << "switch (Isset)" << endl;
     out << indent() << "{" << endl;
-    indent_up();    
+    indent_up();
     for (f_iter = fields.begin(); f_iter != fields.end(); ++f_iter)
     {
         bool needs_typecast = false;
@@ -1604,7 +1604,7 @@
         indent_up();
         out << indent() << "return As_" << (*f_iter)->get_name() << ".GetHashCode();" << endl;
         indent_down();
-    }                
+    }
     out << indent() << "default:" << endl;
     indent_up();
     out << indent() << "return (new ___undefined()).GetHashCode();" << endl;
@@ -1620,7 +1620,7 @@
         indent_up();
         out << indent() << "switch (Isset)" << endl;
         out << indent() << "{" << endl;
-        indent_up();    
+        indent_up();
         for (f_iter = fields.begin(); f_iter != fields.end(); ++f_iter)
         {
             bool needs_typecast = false;
@@ -1629,7 +1629,7 @@
             indent_up();
             out << indent() << "return new " << (*f_iter)->get_name() << "(As_" << (*f_iter)->get_name() << copy_op << ");" << endl;
             indent_down();
-        }                
+        }
         out << indent() << "default:" << endl;
         indent_up();
         out << indent() << "return new ___undefined();" << endl;
@@ -1646,7 +1646,7 @@
 
     out << indent() << "public override object Data { get { return null; } }" << endl
         << indent() << "public ___undefined() : base(0) {}" << endl << endl;
-        
+
     if( ! suppress_deepcopy) {
         out << indent() << "public new ___undefined DeepCopy()" << endl;
         out << indent() << "{" << endl;
@@ -1659,7 +1659,7 @@
     t_struct undefined_struct(program_,"___undefined");
     generate_netstd_struct_equals(out, &undefined_struct);
     generate_netstd_struct_hashcode(out, &undefined_struct);
-    
+
     out << indent() << "public override global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)" << endl
         << indent() << "{" << endl;
     indent_up();
@@ -1696,8 +1696,8 @@
     indent_down();
     out << indent() << "}" << endl
         << endl;
-    
-    
+
+
     out << indent() << "public class " << tfield->get_name() << " : " << tunion->get_name() << endl;
     out << indent() << "{" << endl;
     indent_up();
@@ -2014,9 +2014,10 @@
         << indent() << "{" << endl
         << indent() << "}" << endl
         << endl
-        << indent() << "public Client(TProtocol inputProtocol, TProtocol outputProtocol) : base(inputProtocol, outputProtocol)"
+        << indent() << "public Client(TProtocol inputProtocol, TProtocol outputProtocol) : base(inputProtocol, outputProtocol)" << endl
         << indent() << "{" << endl
-        << indent() << "}" << endl;
+        << indent() << "}" << endl
+        << endl;
 
     vector<t_function*> functions = tservice->get_functions();
     vector<t_function*>::const_iterator functions_iterator;
@@ -2030,12 +2031,29 @@
         out << indent() << "public async " << function_signature_async(*functions_iterator, "") << endl
             << indent() << "{" << endl;
         indent_up();
+        out << indent() << "await send_" << function_name << "(";
+        string call_args = argument_list((*functions_iterator)->get_arglist(),false);
+        if(! call_args.empty()) {
+            out << call_args << ", ";
+        }
+        out << "cancellationToken);" << endl;
+        if(! (*functions_iterator)->is_oneway()) {
+            out << indent() << ((*functions_iterator)->get_returntype()->is_void() ? "" : "return ")
+                            << "await recv_" << function_name << "(cancellationToken);" << endl;
+        }
+        indent_down();
+        out << indent() << "}" << endl << endl;
+
+        // async send
+        out << indent() << "public async " << function_signature_async(*functions_iterator, "send_", MODE_NO_RETURN) << endl
+            << indent() << "{" << endl;
+        indent_up();
 
         string tmpvar = tmp("tmp");
         string argsname = (*functions_iterator)->get_name() + "Args";
 
         out << indent() << "await OutputProtocol.WriteMessageBeginAsync(new TMessage(\"" << raw_func_name
-            << "\", TMessageType." << ((*functions_iterator)->is_oneway() ? "Oneway" : "Call") 
+            << "\", TMessageType." << ((*functions_iterator)->is_oneway() ? "Oneway" : "Call")
             << ", SeqId), cancellationToken);" << endl
             << indent() << endl
             << indent() << "var " << tmpvar << " = new InternalStructs." << argsname << "() {" << endl;
@@ -2061,8 +2079,16 @@
             << indent() << "await OutputProtocol.WriteMessageEndAsync(cancellationToken);" << endl
             << indent() << "await OutputProtocol.Transport.FlushAsync(cancellationToken);" << endl;
 
+        indent_down();
+        out << indent() << "}" << endl << endl;
+
         if (!(*functions_iterator)->is_oneway())
         {
+            // async recv
+            out << indent() << "public async " << function_signature_async(*functions_iterator, "recv_", MODE_NO_ARGS) << endl
+                << indent() << "{" << endl;
+            indent_up();
+
             string resultname = (*functions_iterator)->get_name() + "Result";
             t_struct noargs(program_);
             t_struct* xs = (*functions_iterator)->get_xceptions();
@@ -2111,11 +2137,7 @@
                 out << indent() << "}" << endl;
             }
 
-            if ((*functions_iterator)->get_returntype()->is_void())
-            {
-                out << indent() << "return;" << endl;
-            }
-            else
+            if (!(*functions_iterator)->get_returntype()->is_void())
             {
                 out << indent() << "throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, \""
                     << function_name << " failed: unknown result\");" << endl;
@@ -2125,11 +2147,6 @@
             indent_down();
             out << indent() << "}" << endl << endl;
         }
-        else
-        {
-            indent_down();
-            out << indent() << "}" << endl;
-        }
 
         cleanup_member_name_mapping(arg_struct);
     }
@@ -2335,7 +2352,7 @@
 
     bool is_deprecated = (tfunction->annotations_.end() != tfunction->annotations_.find("deprecated"));
     if( is_deprecated) {
-      out << indent() << "#pragma warning disable CS0618,CS0612" << endl; 
+      out << indent() << "#pragma warning disable CS0618,CS0612" << endl;
     }
 
     out << indent();
@@ -2373,7 +2390,7 @@
     out << "cancellationToken);" << endl;
 
     if( is_deprecated) {
-      out << indent() << "#pragma warning restore CS0618,CS0612" << endl; 
+      out << indent() << "#pragma warning restore CS0618,CS0612" << endl;
     }
 
     vector<t_field*>::const_iterator x_iter;
@@ -2415,7 +2432,7 @@
         << indent() << "catch (TTransportException)" << endl
         << indent() << "{" << endl
         << indent() << "  throw;" << endl
-        << indent() << "}" << endl 
+        << indent() << "}" << endl
         << indent() << "catch (Exception " << tmpex << ")" << endl
         << indent() << "{" << endl;
     indent_up();
@@ -3001,7 +3018,7 @@
     }
   }
   result << "\"";
-  
+
   return result.str();
 }
 
@@ -3319,7 +3336,7 @@
     {
         return "";  // simple assignment will do
     }
-    else 
+    else
     {
         needs_typecast = (! ttype->is_container());
         return "." + DEEP_COPY_METHOD_NAME + "()";
@@ -3384,28 +3401,30 @@
     return type_name(ttype) + " " + func_name(normalize_name(prefix + tfunction->get_name())) + "(" + argument_list(tfunction->get_arglist()) + ")";
 }
 
-string t_netstd_generator::function_signature_async(t_function* tfunction, string prefix)
+string t_netstd_generator::function_signature_async(t_function* tfunction, string prefix, int mode)
 {
     t_type* ttype = tfunction->get_returntype();
     string task = "global::System.Threading.Tasks.Task";
-    if (!ttype->is_void())
+    if ((!ttype->is_void()) && ((mode & MODE_NO_RETURN) == 0))
     {
         task += "<" + type_name(ttype) + ">";
     }
 
     string result = task + " " + func_name(normalize_name(prefix + tfunction->get_name()) + (add_async_postfix ? "Async" : "")) + "(";
     string args = argument_list(tfunction->get_arglist());
-    result += args;
-    if (!args.empty())
-    {
-        result += ", ";
+    if((mode & MODE_NO_ARGS) == 0) {
+        result += args;
+        if (!args.empty())
+        {
+            result += ", ";
+        }
     }
     result += "CancellationToken cancellationToken = default)";
 
     return result;
 }
 
-string t_netstd_generator::argument_list(t_struct* tstruct)
+string t_netstd_generator::argument_list(t_struct* tstruct, bool with_types)
 {
     string result = "";
     const vector<t_field*>& fields = tstruct->get_members();
@@ -3421,7 +3440,12 @@
         {
             result += ", ";
         }
-        result += type_name((*f_iter)->get_type()) + " " + normalize_name((*f_iter)->get_name());
+
+        if( with_types) {
+            result += type_name((*f_iter)->get_type()) + " ";
+        }
+
+        result += normalize_name((*f_iter)->get_name());
     }
     return result;
 }
diff --git a/compiler/cpp/src/thrift/generate/t_netstd_generator.h b/compiler/cpp/src/thrift/generate/t_netstd_generator.h
index b35550d..51230e8 100644
--- a/compiler/cpp/src/thrift/generate/t_netstd_generator.h
+++ b/compiler/cpp/src/thrift/generate/t_netstd_generator.h
@@ -131,12 +131,16 @@
   string netstd_type_usings() const;
   string netstd_thrift_usings() const;
 
+  static const int MODE_FULL_DECL = 0x00;
+  static const int MODE_NO_RETURN = 0x01;
+  static const int MODE_NO_ARGS   = 0x02;
+
   string type_name(t_type* ttype);
   string base_type_name(t_base_type* tbase);
   string declare_field(t_field* tfield, bool init = false, string prefix = "");
-  string function_signature_async(t_function* tfunction, string prefix = "");
+  string function_signature_async(t_function* tfunction, string prefix = "", int mode = MODE_FULL_DECL);
   string function_signature(t_function* tfunction, string prefix = "");
-  string argument_list(t_struct* tstruct);
+  string argument_list(t_struct* tstruct, bool with_types = true);
   string type_to_enum(t_type* ttype);
   string prop_name(t_field* tfield, bool suppress_mapping = false);
   string func_name(t_function* tfunc, bool suppress_mapping = false);
