subject

What is wrong with this code? I cannot get the port to connect to the socket at all. When I enter a port number the client does nothing. Instructions:Implementing doServer(int listenFd) (10 Points):doServer() should have a loop in which it waits for a client to connect to listenFd. When a client does, it should:malloc() enough memory for 2 integersput the file descriptor from accept() in one of those spacesput the value of threadCount in the other space, and increment threadCountMake a detached thread to handle this new client. I called my function handleClient(), but you may call yours whatever. Pass the address of your malloc()-ed array. The loop should then go back for another accept().void* handleClient(void* vPtr) (10 Points):(Or whatever you call your function that runs a thread for the client.)The thread id and the file descriptor are passed, but they come in as a void* pointer. Use another pointer to cast back to int*Save the file descriptor and thread number in local varsfree() the memoryPrint the thread number and do a loop

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 20:10, banna01man
Leo is a recruitment executive for a large company. he has identified new labor resource requirements in both the marketing and production departments. what should be his first step in recruiting candidates for the positions? a. conduct background checks of candidates b. make job offers c. arrange interviews d. conduct reference checks e. place job ads on job sites
Answers: 1
image
Computers and Technology, 24.06.2019 05:30, MegRasmussen31
Hey i really need some solving this problem: 1. encrypt this binary string into cipher text: 110000. include in your answer the formula the decoder would use to decrypt your cipher text in the format (coded answer) x n mod (m) = y & 2. decrypt this cipher text into a binary string: 106 you.
Answers: 2
image
Computers and Technology, 24.06.2019 16:00, kamo90
How are roger williams, james oglethorpe, and william penn similar?
Answers: 3
image
Computers and Technology, 24.06.2019 17:50, jones03riley
You work in the accounting department and have been using a network drive to post excel workbook files to your file server as you complete them. when you attempt to save a workbook file to the drive, you see the error message: “you do not have access to the folder ‘j: \’. see your administrator for access to this folder.” what should you do first
Answers: 2
You know the right answer?
What is wrong with this code? I cannot get the port to connect to the socket at all. When I enter a...

Questions in other subjects: