CAsyncSocket samples...

This is a discussion on CAsyncSocket samples... within the Networking/Device Communication forums, part of the General Programming Boards category; does anybody knows where i could find some MFC TCP CAsyncSocket client/server good examples ? i have searched everywhere and ...

  1. #1
    Registered User
    Join Date
    Dec 2004
    Posts
    103

    CAsyncSocket samples...

    does anybody knows where i could find some MFC TCP CAsyncSocket client/server good examples ? i have searched everywhere and i can't find any good example everywhere i look i find different things

    thanks

  2. #2
    Registered User
    Join Date
    Dec 2004
    Posts
    73
    Try posting this in the network section and maybe you'll get some replies. Sorry I can't help you more, but I don't know much bout sockets. However, try www.gametutorials.com, they have some network tutorials i believe. Hopefully they have what you are looking for.

  3. #3
    Registered User
    Join Date
    Dec 2004
    Posts
    103
    thx, maybe the moderators will move this thread there :P

  4. #4
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,691
    MSDN: CAsyncSocket

    There are two example programs.

    gg

  5. #5
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,761
    Moved to network board
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  6. #6
    Registered User
    Join Date
    Dec 2004
    Posts
    103
    already knew it, its for .net :P i only use 6.0 and i kinda know how to make a server work just dunno about the client thanks anyway

  7. #7
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,691
    The MFC 6.0 CAsyncSocket is the same as the MFC 7.0 version. The CHATSRVR example has a cooresponding client application.

    There is plenty of MFC documentation on how it wraps socket functionality, so if you understand sockets then using the wrappers is just a matter of reading the documentation.

    gg

  8. #8
    Registered User
    Join Date
    Dec 2004
    Posts
    103
    oh ok thx ill have a look at it

  9. #9
    Registered User
    Join Date
    Dec 2004
    Posts
    103
    hmm cant edit my last post anyway so i kinda understood how it works but how do you make the OnConnect, OnError... etc events work for this.. :
    Code:
    	CAsyncSocket sock;
    	sock.Create();
    	sock.Connect("yahoo.com",80);
    it connects and then it closes connection itself.. and i noticed it creates an UDP listening port then closes it anybody know why ?
    i hope you guys understand what im trying to say, sorry im just trying to learn how mfc/c++ works

    thanks

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. WCF basic samples
    By George2 in forum C# Programming
    Replies: 7
    Last Post: 08-06-2008, 12:08 AM
  2. Problem with some arithmetic!
    By bobthebullet990 in forum C Programming
    Replies: 4
    Last Post: 01-05-2007, 10:04 AM
  3. MCI - multiple samples at once
    By tigs in forum Windows Programming
    Replies: 2
    Last Post: 06-16-2003, 02:55 PM
  4. Looking for samples how to write an IRC client in C#
    By gicio in forum C# Programming
    Replies: 1
    Last Post: 12-06-2002, 11:54 PM
  5. Winsock, CAsyncSocket Derivative.
    By Xei in forum C++ Programming
    Replies: 1
    Last Post: 06-04-2002, 12:24 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21