hi all -
I just started working with all this so my terminology may be bad.
Im using VC++ with winsock2.h and glut.h
A piece of software is outputting a signal via TCP/IP; I initialize a socket and can read data from it by using recv() within a while loop.
however, when I put the data acquisition code within the display loop of an openGL function, the data acquisition stalls. I think this is because the server is sending data faster than the client can receive so it stops. I was thinking of perhaps using an asynchronous implementation where the TCP/IP data is retrieved by a function running in parallel with the display loop. Do you happen to know a way of doing this? It seems like there are similar mechanisms used within the OpenGL loop to get input from the keyboard, which suggests to me that the GLUT display loop isnt blocking the main function.. is this true?
I just started working with all this so my terminology may be bad.
Im using VC++ with winsock2.h and glut.h
A piece of software is outputting a signal via TCP/IP; I initialize a socket and can read data from it by using recv() within a while loop.
however, when I put the data acquisition code within the display loop of an openGL function, the data acquisition stalls. I think this is because the server is sending data faster than the client can receive so it stops. I was thinking of perhaps using an asynchronous implementation where the TCP/IP data is retrieved by a function running in parallel with the display loop. Do you happen to know a way of doing this? It seems like there are similar mechanisms used within the OpenGL loop to get input from the keyboard, which suggests to me that the GLUT display loop isnt blocking the main function.. is this true?
Comment