Asked by:
How to write a udp windows service

Question
-
Dear all,
I am new to UDP socket programming. I need to write a windows service that listen UDP message and then use the message to control device. Because I need to write it in short days. Does there exist any sample code that is a windows service listen at UDP port. Just want to grasp the method quickly.
Thanks.
hon123456
- Moved by Jason Dot Wang Thursday, December 13, 2012 7:55 AM This thread is about Network Class Library (From:Visual C# General)
Wednesday, December 12, 2012 9:47 AM
All replies
-
Hi,
Have a look at this MSDN forums thread: Simple UDP example code. The UdpClient Class would be your starting point...
Hope this helps
Please mark the best replies as answers
Blog: bloggingabout.net/blogs/rick
Twitter: @rickvdboschWednesday, December 12, 2012 10:13 AM -
1- A Chat Application Using Asynchronous UDP sockets
3- Testing TCP and UDP socket servers using C# and .NET
5- UDP Send and Receive using threads in VB.NET
6- A UDP based Reliable Data Transfer Library
good luck
Please mark the post as an answer that helps/solves your problem.
Wednesday, December 12, 2012 11:06 AM -
Hi hon123456,
Welcome to MSDN Forum Support.
You are more likely to get more efficient responses to Network Class Library(System.Net) issues at http://social.msdn.microsoft.com/Forums/en-US/ncl/threads where you can contact Network Class Library(System.Net) experts,so I would like to redirect you to appropriate forum for better
responses.Sincerely,
Jason Wang
Jason Wang [MSFT]
MSDN Community Support | Feedback to us
Thursday, December 13, 2012 7:54 AM -
Here is how to write a window service. You just need to hook your logic to the different life cycle methods of the services and can use the udp examples or any other code to run the server.
Thanks,
Brad
Thursday, December 13, 2012 2:51 PM