Click here to Skip to main content
15,944,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

i am trying to write some kind of a simple information System. My Server is written in c#, it sends every minutes udp heartbeats with Server Information (ip, port of the Server). Now i want to write a simple Website with html and JavaScript that connects to my Server and receives data from it. If a webclient receives an udp heartbeat the Website should connect to the tcp socket of the server. Is there a simple clientside solution for this? I know i can do such things with flash or silverlight, but i do not want to use any kind of plugins.

Kind Regards
Manuel
Posted

1 solution

You can set up a TCPListener depending, if you google the class there is a very straght forwad example.

http://msdn.microsoft.com/en-us/library/system.net.sockets.tcplistener.aspx[^]

make sure that you select the right version of .net for your client implmentation for the example.
 
Share this answer
 
Comments
m.bleimuth 5-Nov-12 16:44pm    
the c# program with the tcp Server is not the Problem, the Problem is the udp and tcp Client in JavaScript for the Webpage.
[no name] 7-Nov-12 9:17am    
You might want to add this to improve your question

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900