10_26_hw3

10_26_hw3 - to happen first Some variable that would hold...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
One way to go to sleep is use the select call One way is to use NULL for readfds, writefds, exceptfds, and put a value for timeout, call the select, wont return until it times out Nc see if it sends, send out one packet, telnet dump For server, parsed all the options. Need to receive packets and output. Tempting to create another thread that’s going to handle output the array. Multi threaded program. Select loop: wait for packets to arrive, maintain timers. Keep track of the current time. Whether its time to output something again. We needed to do possibly things but don’t know wha’ts going
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: to happen first. Some variable that would hold the number of microseconds since the last itme you sent something to the stdio. Maybe u have another time that holds the value of the current time. Typical to get time and day everytime you wake up. Out of selectcall you call the time. After you wake from select call, load that wariable from whatever time stamp was. Compare the current time to the absolute time of the last update then you’ll compare that difference of a threshold value. One task would be output rate. Set maybe the beginning Pipe Fork() creating a clone of itself...
View Full Document

This note was uploaded on 11/02/2011 for the course ECE 158a taught by Professor Cruz during the Spring '11 term at UCSD.

Ask a homework question - tutors are online