开发者

How do i just send stuff to the internett?

Im making a logging app and just want to send stuff. Right now im using HttpWebRequest and Stream to send a post message to my webs开发者_如何学运维erver so i can observe the stats online.

However, and really often, the sending of the data times out and that messes up my application totally as it does things in a Forms.Timer tick action.

Is there another way to just send stuff to the net? I dont really care if it gets thru or not and getting back a response, i just want to push data to my php script :D


UDP is designed for that. It can lose or reorder packets and doesn't need a response from the server.

But I don't know if you can(or want to) create a UDP server in php.

One alternative is having a thread which does the sending. And the other threads just enqueue log-entries into a thread-safe queue emptied by the sending thread.


On your website you could host a webservice and from the WinForms client you could call asynchronous the webservice to send your data, this way the app will not block.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜