I am creating a server app in C++.NET, I am trying to make it multithreaded. I created a class called multiserver, and it has the method start listening to listen for connections.
ipHost = Dns::Resolve(Dns::GetHostName());
ipA = ipHost->AddressList;
ipEP = new IPEndPoint(ipA, 11000);
tListen = new TcpListener(ipEP);
//loop to start connections
clientSoc = tListen->AcceptSocket();
clService = new Thread(new ThreadStart(this, servClient));
MessageBox::Show(e->ToString(), S"Error", MessageBoxButtons::OK, MessageBoxIcon::Error);
}//end start listening
On the main Form1 for the app I have another thread start
public __gc class Form1 : public System::Windows::Forms::Form
clientList = new ArrayList();
processor = new Thread(new ThreadStart(&ms, ms->startListening));
The problem I am have is this:
error C3754: 'void MultiServer::startListening(void)': cannot be called through a variable of type 'MultiServer __gc ** '
Can anyone help?