Click here to Skip to main content
15,888,984 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
Hello,

Does anyone of a project where a socket was used to pass the communication between a server and a browser? Yes, like a websocket, but w/o. Basically, you would have a program that would create two socket connections. One with the browser and another with the server, pass the information back and forth. I have searched on google, but haven't been able to come up with anything. Perhaps I should be searching on a specific keyword.

I would like to find something in C# or VB.Net. Any info would be appretiated.

Thanks,

-ren
Posted

Yes, I guess you have to search for a specific key word. The question is not quite clear, but I guess the key words should be "Push technology" and "Server push".

You will find pretty good overview of the topic and available technologies here: http://en.wikipedia.org/wiki/Server-push[^].

For a somewhat related and much more general topic, read about inversion of control: http://en.wikipedia.org/wiki/Inversion_of_control[^].

This is a very interesting field. I was thinking to vote 5 for your interesting question, but was not sure you are asking about right things. Perhaps you have been so vague because you're coming to the idea, but not familiar with the field and terminology. I suggest you bootstrap yourself by reading these two articles and some articles referenced there. In this way, I hope you can get into it and even start putting it into practice, which I sincerely wish you.

Best regards,
—SA
 
Share this answer
 
v2
Comments
RaisKazi 29-Oct-11 2:58am    
My 5! For "Server Push", If we both did not misunderstood OP's Question. :)
This concept/term is known as "Comet". Please have a look at my Answer.
Sergey Alexandrovich Kryukov 29-Oct-11 21:45pm    
"Comet" related to just on of approaches, this is a group of techniques of what is also called "long polling", that is, a push "ordered" by a separate polling request each time a push is needed.
However, I look at your solution...
Espen Harlinn 29-Oct-11 5:40am    
Good reply :)
Sergey Alexandrovich Kryukov 29-Oct-11 21:46pm    
Thank you, Espen.
--SA
If I am not misunderstood your Question, You are looking for a something like called "Comet", In which their is a persistent connection maintained between Server and Client(Browser).

Have a look at some Articles about "Comet" on CodeProject.
Scalable COMET Combined with ASP.NET

ASP.NET and Comet: Bringing Sockets Back

Here you will get more CodeProject Articles on "Comet".
http://www.codeproject.com/search.aspx?q=Comet+C%23&sbo=kw
 
Share this answer
 
Comments
Espen Harlinn 29-Oct-11 5:40am    
Good reply :)
RaisKazi 29-Oct-11 8:13am    
Thank you Espen. :)
Sergey Alexandrovich Kryukov 29-Oct-11 21:46pm    
...and I think those articles a very useful, good to know; thank you for sharing; I voted 5.
--SA
RaisKazi 30-Oct-11 1:37am    
Thank you SA. :)
hi,
If you want to do something like this, wouldn't it be better to use ajax?

why do you need to create socket?
If you want to create socket using c#, it will not create socket not between browser and server, but it will create socket between your web server and other server.

Regards
Robert
 
Share this answer
 
Comments
renasis_ 28-Oct-11 18:26pm    
Should have mentioned in earlier post. The two socket connections would send messages back and forth.
RaisKazi 29-Oct-11 3:00am    
My 4! If I did not misundersood OP's Question, then it is possible using "Comet", what OP is looking for.

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