This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
To work server and client test program on Windows. #150
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Now you can run client and server, and you can do following instructions.
gcc -o server server.c -lws2_32 && gcc -o client client.c
./server 1337 & ./client 127.0.0.1 1337
[1]
Sleepint 1 second
I got the connection
[1]+ Done
This client server test do work well, even if server terminate before client terminate.
I think to need to make server be more similar to git-daemon.
1 git-daemon socket
On this commit, you can test socket status between client and server. However
server is not like git-daemon. Server itself write data to a socket, whereas
git-daemon make child-process write them to a socket as stdout.
1 client -- socket -> server
1 client -- socket -> git-daemon
2 client, socket, stream and server
Not for sure, I think datagram is in any buffer of client, socket, stream and
server. If test data is too small, it will be arrived at client buffer soon.
Here is my image of buffer model.
Signed-off-by: Toshiyuki Ogawa [email protected]