-
don't necessary, you can use another constructor:
string resPath= AppDomain.CurrentDomain.BaseDirectory + "fastagi-mapping.resources";
this.agi = new AsteriskFastAGI(resPath);.
2008-10-15 18:33:18 UTC in Asterisk .NET
-
thanks!
but tcpListener is not null after this.agi.close()
this change is ok in ServerSocket.cs:
public IO.SocketConnection Accept()
{
try
{
TcpClient tcpClient = tcpListener.AcceptTcpClient();
if (tcpClient != null)
return new IO.SocketConnection(tcpClient, encoding);
}
catch (System.Exception e)
{
throw new System.IO.IOException(e.Message);
}
return null;
}.
2008-10-15 18:31:24 UTC in Asterisk .NET
-
service code:
void dojobs()
{
string resx = AppDomain.CurrentDomain.BaseDirectory + "fastagi-mapping.resources";
this.agi = new AsteriskFastAGI(resx);
this.agi.Start();
}
protected override void OnStart(string[] args)
{
thread = new Thread(new ThreadStart(dojobs));
thread.Start();
}
protected override void OnStop()
{
this.agi.Stop();
// give it a little time to finish...
2008-10-15 16:47:39 UTC in Asterisk .NET