Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# Javascript TCP/IP TcpClient , +
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 5-Nov-12 11:37am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Comments
m.bleimuth at 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.
Mathlab at 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)



Advertise | Privacy | Mobile
Web02 | 2.8.141220.1 | Last Updated 5 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100