I have code like this
public async void Start() { Logger.Log(Logger.LogLevel.General, "Beginning Listen!"); HttpListener listener = new HttpListener(); listener.Prefixes.Add(Statics.Config.IniReadValue("http-server")); listener.Start(); while (true) { HttpListenerContext client = await listener.GetContextAsync(); AcceptClient(client); } } public async void AcceptClient(HttpListenerContext client) { try { string sRequest = Helpers.GetRequestBody(client.Request); if (sRequest == "") return; client.Response.ContentType = "application/json";
The code works fine on Windows using .Net, but in my testing on Ubuntu 13.04 the client is disabled. I am using Mono 3.2.1.
The code for the RPC server that is associated with the C ++ client, I can not change. The client expects that the connection will remain open for the entire period and will not end with a failed pipe in unix and error code 5, eof on Windows when using this server with Mono.
There is no problem connecting, but after the first command, the client fails. An exception is thrown. Thank you for your help!
EDIT 1: I ripped the mono-HttpListener and used it in my project directly, and now it fails on .Net too. There is definitely something wrong with the code. The postscript this time was the latest commit code.
archit
source share