New feature: implement SendRequest
See original GitHub issuehi jchristin, I’m new to github, I’ve found your library very useful for my next project. It’s very easy to use and works very good. I would like see in your WatsonTcpClient class an implementation of a method like this
byte[] SendRequest(Dictionary<object,object>, string data)
When the client sends this message it will wait for the response and then provide the response as return value.
When the server receives the Request it fires an event and after event management sends the response to the client.
Who manages the server event must set the response in a property of eventargs. Also the server have to respond very quickly 😃
I think that in this case the communication between the client and the server will be synchronous, i cannot send to server other requests until the current has no response.
I don’t know if this is a good idea but this implementation makes the TCP calls more similar to method calls.
let me know what do you think about
Thanks
Ozrecsec
Issue Analytics
- State:
- Created 4 years ago
- Comments:31 (20 by maintainers)
Top GitHub Comments
Ok I think I have a solution here. The issue was around conversion to UTC. I don’t know, however, if this fix will break the fix I put in for @ozrecsec so I’ll need confirmation. Also both Test.Client and Test.Server now have a command called
sendandwait empty
for this purpose.NuGet v3.1.3: https://www.nuget.org/packages/WatsonTcp/3.1.3 Commit: https://github.com/jchristn/WatsonTcp/commit/495cffc36e069b7c0234f8ea3fc659b2a6273724
Please let me know if any issues either way.
Hi @ozrecsec let me know what you think 😃
NuGet v3.1.0: https://www.nuget.org/packages/WatsonTcp/3.1.0 Commit: https://github.com/jchristn/WatsonTcp/commit/841d9fc11ae6a1a32d6888be9a1847f66a87d81a
Updated README.md has examples, as do the Test.Client and Test.Server projects.