9/16/2023 0 Comments C socket accept return 0![]() ![]() After the socket has been linked to another socket, the slot number may be used as the file descriptor parameter in calls to the read and write functions." (page 262, The Berkeley UNIX Environment by Nigel Horspool). ![]() When a socket is created, it is allocated a slot in the object descriptor table exactly as for an open file. "A socket is like the end point of a UNIX pipe.A single socket is used in exactly the same way as a file descriptor. You just need to know a commonly shared file(for AF_UNIX) or an internet address(for AF_INET). ![]() For sockets, you do not need a child and parent relationship. Next, you forked the process so that you had a child and parent who both knew about the pipe. If you think back to the lab on pipes, you first had to create the pipe (with file descriptors for the the read and write end). Sockets are a form of interprocess communication that exists between two unrelated processes. To get the sample and exercise code, please use the following commands in your cs330 directory: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |