Re: sockets in MFC

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Quinn and Shute, Windows Sockets Network Programming
Comer and Stevens, Internetworking with TCP/IP Vol III (Windows edition--there's also a
Unix edition, make sure you get the right one).

Pieces of code do not require sockets. You need to state what you are doing more clearly.

Note that you should study CAsyncSocket in MFC. Avoid CSocket, it basically can't ever
work right. There are good CAsyncSocket examples in the MSDN. Example: having read the two
above books, I was able to integrate socket programming into a product in three days,
because the client wanted UDP sockets. After evaluating what I'd done, he asked "Can you
add TCP/IP also?". It took me another day. Most of those three days were doing things like
writing the GUI interface to support socket connections and getting the low-level
interfaces to the sockets working. The asynchronous socket programming followed the MSDN
examples and went in very quickly.
joe

On Tue, 7 Jun 2005 14:07:03 -0700, "RM" <RM@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

>Greetings,
>I am new to Socket programming. I have a couple of questions. Is there any
>good book which I could use to do Socket Prog. in MFC.
>Also if I have a piece of code that needs to communicate to more than one
>piece of code (say 4), do I need to create 4 socket objects.
>thanks in advance,
>best regards

Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.



Relevant Pages

  • Re: SO_REUSEPORT and multicasting
    ... programming class, ... on BSD socket ... But when binding to multicast ... SO_REUSEPORT (p. 731, "TCP/IP Illustrated, Volume ...
    (Linux-Kernel)
  • RE: WSASend/WSARecv and IOCP GetQueuedCompletionStatus
    ... Programming for Microsoft Windows 2nd Edition" I'll ... That book has a nice coverage of IOCP and TCP. ... with TCP and needing UDP for game related programming. ... I don't even have a socket handle to close. ...
    (microsoft.public.win32.programmer.networks)
  • Re: Need good Visual C++ Winsock2 book recommendations?
    ... I'm conerned with an earlier answer that characterized raw socket ... or datagram mode when you speak of raw socket programming, ... In the server/service piece there is a "Listener " thread. ... In the listener thread, a SOCKET value is passes on startup that has been ...
    (microsoft.public.vc.mfc)
  • Re: socket communication: socket doesnt connect
    ... "Programming Applications for Microsoft Windows", ... "Network Programming for Microsoft Windows" ... I am a complete beginner in socket programming and in using threads. ...
    (microsoft.public.win32.programmer.networks)
  • Re: Between C and Java - which is easier for writing networking software
    ... I possess only ISO99 C and ISO98 C++ programming skills. ... Since theoretical concepts about TCP/IP, SNMP etc. are common, I have ... Under this situation, between C and Java, which will be the language I ... to set up a socket -- you just create a Socket object and call a ...
    (comp.programming)