winsock or CSocket
-
hi all, i am trying to write a client to connect to a non-mfc application thro' network. i am just at the beginning, i found that CSocket approach only support connecting to mfc application as the CArchive used. is it true? would you recommend using winsock api or start from CSocket to connect to a non-mfc server? i don't have too much idea about these. pls try to give me some idea! thanks, jim
-
hi all, i am trying to write a client to connect to a non-mfc application thro' network. i am just at the beginning, i found that CSocket approach only support connecting to mfc application as the CArchive used. is it true? would you recommend using winsock api or start from CSocket to connect to a non-mfc server? i don't have too much idea about these. pls try to give me some idea! thanks, jim
I'm actually going through a similar situation. And I can tell you that CSocket will not connect to a standard socket connection. If you use CSocket, you have to use CSocket throughout. If you can't use CSocket on all ends, use basic sockets. There's quite a bit of info out there. Programming in binary is as easy as 01 10 11.
-
hi all, i am trying to write a client to connect to a non-mfc application thro' network. i am just at the beginning, i found that CSocket approach only support connecting to mfc application as the CArchive used. is it true? would you recommend using winsock api or start from CSocket to connect to a non-mfc server? i don't have too much idea about these. pls try to give me some idea! thanks, jim
Hello, the codegurus around the world.;) As the previous poster pointed out, CSocket or CAsyncSocket class is closely related to GUI by MFC. So, if you don't need to use MFC, you don't need these classes at all. (In fact, WSAAsyncSelect function is inserted some messages like FD_WRITE to Window message process at CSocket and CAsynSocket) As a result, WinSock API is best choice for you. Please, don't send me your email about your questions directly. Have a nice day! Sonork - 100.10571:vcdeveloper ;)
-Masaaki Onishi-
-
Hello, the codegurus around the world.;) As the previous poster pointed out, CSocket or CAsyncSocket class is closely related to GUI by MFC. So, if you don't need to use MFC, you don't need these classes at all. (In fact, WSAAsyncSelect function is inserted some messages like FD_WRITE to Window message process at CSocket and CAsynSocket) As a result, WinSock API is best choice for you. Please, don't send me your email about your questions directly. Have a nice day! Sonork - 100.10571:vcdeveloper ;)
-Masaaki Onishi-
hi, i want to know whether i can use CSocket class to connect to non-mfc application. or, CSocket designed to be able for only connecting to MFC application. in my application, i used MFC GUI. but, what i mean is connecting to Non-MFC application but my application is a MFC application. i don't sure CSocket can connect to standard socket application such as a web server... currently, i am using a winsock API. but, i feel it is a bit trouble on receiving data using recv() function. thanks, jim