CodePudding user response:
You need to create a socket, and accept with the client's connection, binding, and then you can read dataCodePudding user response:
"I/O model network programming" search on the net,Or refer to the http://blog.csdn.net/woshinia/article/details/8585930
According to the specific business need to modify the
CodePudding user response:
Post code to see general because there are no initializationCodePudding user response:
Thread synchronization problem, cause uninitialized variables, thread function is invokedCodePudding user response:
Thread function is a class of static function, can not be directly using the class member variables,Solution, 1 was introduced into the object in the thread function pointer, thread function through a pointer to access class members;
Two is the use of c + + 11, simple, and adopted a more flexible
CodePudding user response:
Static member functions of class can't directly access ordinary member function of a class or member variables, but in turn ordinary member function can access a static member function or static member variables, this is a c + + foundation ~CodePudding user response:
5 6 floor right