Share via


Winsock control tutorial in c# windows forms for client-server program communication

Question

Friday, July 4, 2014 5:47 AM

Hi my name is vishal. I am in process of creating client program ,server program in c# windows forms using Winsock control. I want to client program to communicate/send message to server program and server program must send also send/reply message to client program once it receives message from client program by using button click event in server program. I have to use Winsock control only for achieving this required result because of my BOSS's order's! I cannot use classes associated with System.Net.Sockets because i have to use only winsock control as my BOSS's orders.

Can anyone help me/send me some tutorials/samples on how to use Winsock control for client server communication in c# windows forms?

I am asking this question in this forum because i browsed through net for samples/tutorials regarding client-server communication in c# windows forms using Winsock control but sadly i was able to find only one tutorial and which i need some more tutorials for better understanding of Winsock control in c# windows forms and also better understanding of concept behind client server communication involving winsock control in c# windows forms. There are many tutorials regarding Winsock control in client server communication but unfortunately they are most in vb6 code/vb6 tutorial or in vb.Net code/vb.Net tutorial.

Can anyone help me please? Can anyone send me links of tutorials/samples associated with client server communication involving winsock control in c# windows forms? Any help/guidance in solving of this problem would be greatly appreciated!

Thanks in advance.

Vishal.S

vishal

All replies (3)

Tuesday, July 8, 2014 7:02 AM ✅Answered

Hi Vishal,

Since there is no tutorial about winsock control for C#, I think you can try to convert VB.NET to C#. Their syntax is similar with each other. Use the follow link to help conversion. http://www.developerfusion.com/tools/convert/vb-to-csharp/. If you have any questions about VB.NET, please open thread on http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=vbgeneral.

Regards,

We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.


Monday, July 7, 2014 2:22 AM

Hi Vishal,

We usually use TcpClient or Socket class to communicate with computers. So I cannot find more references about Winsock COM. See the only reference I’ve found. http://www.go4expert.com/articles/winsock-c-sharp-t3312/.

Hope useful.

Regards,

We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.


Monday, July 7, 2014 5:34 AM

Dear Mr.Herro wong

Thank for replying to my post/query i just now went/studied into the link that you have sent me on about winsock control tutorial in client-server communication in c# windows forms. But sadly even that sample/tutorial of winsock control is not coherent as the author of that article has wrongly put image of client form and there is no option for downloading that code/example which would have been great benefit to everyone trying to learn on how to use winsock control for client-server communication in c# windows forms.

I am sorry i have to tell you this and i regret in telling you this. I appreciate you and your efforts to help me. I am not criticizing you . Please dont misunderstand me! I am just Sad that there is no tutorial(clear enough) on using winsock control for client-server communication in c# windows forms and that most tutorials of winsock control are in vb6 or in vb.net codes.

vishal