16.04.2018 Views

Dhoto-JaringanKomputer1 (1)

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

perror("accept");<br />

} else {<br />

FD_SET(newfd, &master); // add to master set<br />

if (newfd > fdmax) { // keep track of the maximum<br />

fdmax = newfd;<br />

}<br />

printf("selectserver: new connection from %s on socket %d\n",<br />

inet_ntoa(remoteaddr.sin_addr), newfd);<br />

}<br />

} else {<br />

// handle data from a client<br />

if ((nbytes = recv(i, buf, sizeof(buf), 0))

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!