One, QT Multithreading class learning
Qthread class, starting a new thread is starting to perform a re-implementation of Qthread::run (), run () is the default real call to Exec (), Qthread::start () starts the execution of the thread, the run () function is at start () Start execution after function call
Qmutex class, Mutex/mutex lock, lock unlock, atomic operation
The Qwaitcondition class, where a thread waits for a wake-up of another thread under certain conditions until it has been dormant for a long time. Qwaitcondition::wakeone () randomly wakes up a waiting thread, qwaitcondition::wakeall () wakes all.
Qreadwritelock provides a lock, read-write lock that can read and write at the same time, share write-time exclusive when reading, write lock priority higher than read lock
Qsemaphore provides an integer signal, which is a mutex, which specifies how many threads are allowed to operate
QT Advanced Threading Class: Qtconcurrent class Opens thread transaction, Qfuturewatcher class observes thread state, Qfuture class thread starts class
Qmutex,qreadwritelock,qsemaphore,qwaitcondition provides the means of thread synchronization, using threads primarily for concurrent execution.
Second, the network programming class in QT learning
Qtcpsocket class of reliable stream transport
Qudpsocket class unreliable large message transfer bind (), Writedatagram () write message, Readdatagram () read newspaper, Joinmulticastgroup () broadcast (Join/leave), Haspendingdatagrams () returns true if at least one message is received
Qabstractsocket class, Connecttohost (), State (), waitforconnected (), Waitfordisconnect (), ReadData (), WriteData ()
Qtcpserver class
Qlocalserver class Listen (), ServerName (), Close ()
Qlocalsocket class ServerName (), Connecttoserver (), Disconnectfromserver (), State (), Waitforconnect (), Waitfordisconnect ( )
Qhostaddress class Setaddress (), toipv4address (), Clear ()
Qhostinfo class, Lookuphost (), Abortlookuphost (), FromName () find Ip,localhostname by name ()
Qt Multithreading and network programming learning