Click here to Skip to main content
15,896,063 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Call another program from my project ?? Pin
Jitendra gangwar30-Apr-04 2:26
Jitendra gangwar30-Apr-04 2:26 
GeneralRe: Call another program from my project ?? Pin
Mughi2-May-04 19:07
Mughi2-May-04 19:07 
GeneralChanging cview's size .. Pin
AbinThomas29-Apr-04 19:25
AbinThomas29-Apr-04 19:25 
GeneralRe: Changing cview's size .. Pin
Anthony_Yio29-Apr-04 23:04
Anthony_Yio29-Apr-04 23:04 
GeneralRe: Changing cview's size .. Pin
AbinThomas29-Apr-04 23:55
AbinThomas29-Apr-04 23:55 
GeneralRe: Changing cview's size .. Pin
David Crow30-Apr-04 3:52
David Crow30-Apr-04 3:52 
GeneralSockets and Active X Pin
shekar_raja29-Apr-04 18:46
shekar_raja29-Apr-04 18:46 
GeneralRe: Sockets and Active X Pin
Jitendra gangwar29-Apr-04 23:21
Jitendra gangwar29-Apr-04 23:21 
In your first question you have asked, as I understand that you want to read/write operations on a same socket. it is absolutely valid. When a client connect to the server. The server accepts it and a new socket is created that represent the client socket on the server. In tern when you write something on it in the server, is send to the client for the reading. And when client write something, that is sent to the server and the server can read that content on the same socket that is representing the client.

According to the second question, you are using the CSocket class of MFC. The CSocket provides the various notifications on the socket like something is received or sent on the socket. These notifications Functions are inherited from its base class CAsyncSocket. And you can override these functions to get the processing done of these notifications. You don't have to you the thread manually in your application for that processing. The MFC Framework already implements it. But if the SDK/Win32 API programming is the choice than you have to manually implement all this functionality.


You can find an example app based on CSocket implementation in MSDN at the below link.

Hope it would help you.
Jitendra
GeneralRe: Sockets and Active X Pin
shekar_raja6-May-04 17:51
shekar_raja6-May-04 17:51 
GeneralSQL server Named Instance Pin
vikramlinux29-Apr-04 18:03
vikramlinux29-Apr-04 18:03 
Generallinked list Pin
pedabber29-Apr-04 15:51
pedabber29-Apr-04 15:51 
GeneralRe: linked list Pin
Christian Graus29-Apr-04 16:00
protectorChristian Graus29-Apr-04 16:00 
GeneralRe: linked list Pin
Christian Graus29-Apr-04 17:15
protectorChristian Graus29-Apr-04 17:15 
GeneralRe: linked list Pin
bryce29-Apr-04 20:04
bryce29-Apr-04 20:04 
GeneralFile IO in binary Pin
Leo Smith29-Apr-04 13:16
Leo Smith29-Apr-04 13:16 
GeneralRe: File IO in binary Pin
David Crow30-Apr-04 3:56
David Crow30-Apr-04 3:56 
GeneralFinding Cursor Position Pin
brigham_young29-Apr-04 12:48
brigham_young29-Apr-04 12:48 
GeneralRe: Finding Cursor Position Pin
parths29-Apr-04 15:12
parths29-Apr-04 15:12 
GeneralRe: Finding Cursor Position Pin
Anthony_Yio29-Apr-04 23:07
Anthony_Yio29-Apr-04 23:07 
GeneralWriting to status bar (ignore the one below) Pin
RalfPeter29-Apr-04 11:57
RalfPeter29-Apr-04 11:57 
GeneralRe: Writing to status bar (ignore the one below) Pin
nguyenvhn29-Apr-04 20:21
nguyenvhn29-Apr-04 20:21 
GeneralWriting to status bar Pin
Anonymous29-Apr-04 11:55
Anonymous29-Apr-04 11:55 
Generalunable to get OnClick event of ActiveX Control Pin
Chauhan Chirag29-Apr-04 10:58
Chauhan Chirag29-Apr-04 10:58 
GeneralRe: unable to get onclick event of ActiveX Control Pin
f6429-Apr-04 11:07
f6429-Apr-04 11:07 
GeneralRe: unable to get onclick event of ActiveX Control Pin
Chauhan Chirag29-Apr-04 11:12
Chauhan Chirag29-Apr-04 11:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.