-
January 17th, 2012, 10:46 PM
#1
localhost socket control
Hi All,
In a VC6 dialog based application, i want to add a local host listening socket control. The purpose is that whenever the listening socket will receive a data say "XYZ" from localhost, then it will run a function that is presently written in the button-click event handler of a Button on the dialog box.
Can anyone provide some sample code for this socket control?
Any help would be highly appreciated.
-naim1
-
January 18th, 2012, 12:22 AM
#2
Re: localhost socket control
Are you sure you don't mean VB6? Things are not control based in C.
What you need is to take a look at CSocket and CListen if you are using MFC, and socket(), connect(), and listen() if you are not. There is sample code with those functions that explain how to listen for incoming socket data.
-Erik
-
January 18th, 2012, 12:55 AM
#3
Re: localhost socket control
Originally Posted by egawtry
Are you sure you don't mean VB6? Things are not control based in C.
What you need is to take a look at CSocket and CListen if you are using MFC, and socket(), connect(), and listen() if you are not. There is sample code with those functions that explain how to listen for incoming socket data.
-Erik
Yes, its VC6 for sure, although i dont know quite well how its goes in VC6. The only thing is that n event has to be generated when a specific data string say "XYZ" is received.
-
January 18th, 2012, 01:20 AM
#4
Re: localhost socket control
Originally Posted by naim1
Yes, its VC6 for sure, although i dont know quite well how its goes in VC6.
So you're trying to write a C++ application using sockets, and you don't know C++?
Regards,
Paul McKenzie
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|