I'm building a windows service in C# to work as a server, I first built it as a regular application and it works like a charm, but when I transferred it to the service I get no connections, everything seems to be set up fine. But when I connect I get nothing, no event is triggered... Is there a difference that I need to keep in mind?
/Nick
public void start()
{
try
{
int port = DEFAULT_PORT;
Int32 numConnections = DEFAULT_NUM_CONNECTIONS;
Int32 bufferSize = DEFAULT_BUFFER_SIZE;
SocketListener sl = new SocketListener(numConnections, bufferSize, parent);
sl.Start(port);
Console.WriteLine("Server listening on port {0}. Press any key to terminate the server process...", port);
Console.Read();
sl.Stop();
}
catch (Exception ex)
{
parent.logger.WriteLogg(ex.ToString(), Logger.LoggType.Debug);
}
}