I have the follow problem: I have a classes with these methods (there are more but it doesn't important):
class SocketServer
{
//pointer to function
SocketServer(int port) {}
int Start(void (*receptor)(char *, int));
}
class SampleGrabberCallback
{
SocketServer *socket;
SocketServer() {
socket = new Socket(1111);
socket->start(&(this::receive_sink)); <---------- my problem
}
void receive_sink(char *buffer, int len);
}
The line with the arrow doesn't work. Start method creates a new thread and keep