Changeset 1708
- Timestamp:
- 04/30/07 13:15:19
(2 years ago)
- Author:
- zcutlip
- Message:
updated readme
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r1707 |
r1708 |
|
| | 1 | test the unix local stream socket |
|---|
| 1 | 2 | |
|---|
| 2 | | writer starts and binds to SOCK_FILE address. It then writes single |
|---|
| 3 | | character to the socket. |
|---|
| 4 | | reader starts and connects to SOCK_FILE. It then reads from it. |
|---|
| | 3 | Entire test program runs locally and does not need network. |
|---|
| 5 | 4 | |
|---|
| | 5 | This implementation makes use of the unix stream socket, using the socketpair() syscall. |
|---|
| 6 | 6 | |
|---|
| 7 | | Run writer and reader in their own shell for better output format. |
|---|
| | 7 | it forks, child writes single character to the socket and the parent reads from it. |
|---|
| 8 | 8 | |
|---|
| 9 | | |
|---|
| 10 | | To test |
|---|
| 11 | | |
|---|
| 12 | | shell1>writer |
|---|
| 13 | | shell2>reader |
|---|
| | 9 | to test: |
|---|
| | 10 | $ ./test |
|---|
| 14 | 11 | |
|---|
| 15 | 12 | |
|---|
| 16 | 13 | |
|---|
| 17 | | |
|---|
Download in other formats:
* Generating other formats may take time.