What i'm trying is sending data from client which is windows application to server which is console application.
First i have to start console application and accept connection from client which is windows form and i need to send listbox selected items to console application on button click.This i have to do through socket programing.
I'm new to socket programing.

can any1 help me on this.

Recommended Answers

All 2 Replies

Take a look at the System.Net.Sockets namespace. You would start by initializing a Socket class. I'll assume you are using TCP (if you aren't, it can vary). You'll have to call the Bind() method on both the server and client sockets. On the server end, you call Listen() and on the client end, you call Connect().

Read through some of the documentation on the MSDN for specifics, but if you need any clarifying, feel free to ask (or you can always Google C# socket tutorial).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.