-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
AMD brings its low-power Bristol Ridge processors to desktops, alongside AM4 socket
By Vlad Dudau,
- amd
- bristol ridge
- (and 8 more)
- 20 replies
- 853 views
-
- 12 answers
- 10,055 views
-
- 2 answers
- 1,920 views
-
- 2 answers
- 1,796 views
-
- 2 answers
- 4,363 views
-
Question
wrack
Hi,
I am trying to write this TCP Socket Client Server app for testing purposes. It works for the most part but some things are not working and I need some help. Please see the project attached created in VS2013 targeting .NET Framework 4.5 using C#.
ServerClient.zip
I took the socket code from here https://code.msdn.microsoft.com/High-Performance-NET-69c2df2f
The issues I am having are,
* When I stop listening on server, I am still receiving data. I would expect that the client should find that it is not connected anymore and throw an error and disconnect.
* I need to send server time back to the client upon receiving data (once the receive is complete). I am doing that but it is not working.
* I have set the buffer size to 64 bytes but if I send more data then it doesn't like that. I thought it was possible to grab data to fill that buffer and then continue receiving more until it finishes.
* One last thing might I ask is some suggestions with error handling since the socket code from MSDN says the "LastError" is not the correct way of doing this.
So I am way over my head with TCP stuff because I don't do network programming often and need some help to sort of these issues.
Cheers
Link to comment
Share on other sites
2 answers to this question
Recommended Posts