正在加载图片...
●。 Example- TCPechod.C o The call to accept blocks the server thread until a connection arrives o Note the call to fork(: after the fork Master process needs to close the child socket o The new child process needs to close the master socket o Sockets only disappear in the processes not the system o Before system deallocates a socket, all the processes own the socket need to close it 19 SIE NTUT Taiwan19 CSIE, NTUT, Taiwan Example – TCPechod.c  The call to accept blocks the server thread until a connection arrives  Note the call to fork(): after the fork() ⚫ Master process needs to close the child socket ⚫ The new child process needs to close the master socket ⚫ Sockets only disappear in the processes not the system ⚫ Before system deallocates a socket, all the processes own the socket need to close it
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有