You can test the SimpleNetworkStreams application is one of three ways:

The first two mechanisms need no detailed explanation: just use the application's GUI to start the servers and run the clients. The last approach warrants a little explanation.

You can test the clients by running dummy servers on the Mac. To run a dummy receive server, you will need two Terminal windows. In the first, run the following command to advertise the service:

dns-sd -R \
Test _x-SNSUpload._tcp. "" \
12345

In the second, run the following command to provide the service:

nc -l 12345 > tmp.png

Every time the client sends a file, the contents will be placed in tmp.png (which you can view with Preview) and you will have to re-run the service.

To run a dummy send server on the Mac, you will need two Terminal windows. In the first, run the following command to advertise the service:

dns-sd -R \
Test _x-SNSDownload._tcp. "" \
12346

In the second, run the following command to provide the service:

nc -l 12346 < image.png

where image.png is the path to an existing image file. Every time the client receives the file, you will have to re-run the service.

You can also test the servers by running dummy clients on the Mac. To run a dummy send client, you must first determine the address and port on which the server is listening. You can do this with the following commands:

dns-sd -L \
Test _x-SNSUpload._tcp. local.

This will print the DNS name and port of the server. You can then send a file to that server with the following command:

nc guy-smiley.local. 56483 \
< image.png

where guy-smiley.local. is the DNS name of the server, 56483 is the port number, and image.png is the path to an existing image file.

Similarly, you can test the send server by running a dummy receive client on the Mac. To do this, you must first determine the address and port on which the server is listening. You can do this with the following commands:

dns-sd -L \
Test _x-SNSDownload._tcp. local.

This will print the DNS name and port of the server. You can then receive a file from that server with the following command:

nc guy-smiley.local. 56482 \
> tmp.png

where guy-smiley.local. is the DNS name of the server and 56482 is the port number. The file will be placed in tmp.png, which you can view with Preview.