CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    George2 is offline Elite Member Power Poster
    Join Date
    Oct 2002
    Posts
    4,468

    Unhappy Question about raw socket and TCP.

    Hi, everyone!

    I want to implement a mini-TCP protocol that can simulate
    TCP's three-time shake hands method and simulate simple
    "send" and "recv" method in socket programming. I want to
    use raw socket but I am not sure whether there are some
    alternative methods.

    I just want to get simple implementions to make a concept
    proof purpose of how TCP is working. Just for learning purpose.
    :-)

    I want to know whether there are some sample codes of this
    topic that I can make a reference? Must I use RAW SOCKET?
    Are there some alterative methods or alternative methods?



    Thanks in advance,
    George

  2. #2
    Join Date
    May 2000
    Location
    Phoenix, AZ [USA]
    Posts
    1,347
    No offense, but please don't create duplicate threads. You have
    another thread a few posts down regarding this same subject.
    I realize that you didn't get a reply, but just reply to that thread;
    there is no need to create another.

    --Paul

  3. #3
    Join Date
    Feb 2002
    Posts
    5,757
    Do you want to simulate a network or do you want to design a network? You do not need sockets to simulate a network. As for a real network connection, yes, one solution is raw socket.

    As for code, I recommend that you learn winsock via books. I highly recommend Network Programming for Microsoft Windows, Second Edition by Anthony Jones and Jim Ohmund.

    Kuphryn

  4. #4
    George2 is offline Elite Member Power Poster
    Join Date
    Oct 2002
    Posts
    4,468
    Thanks, kuphryn buddie!

    My purpose is only to make up the TCP package manually
    and not simply by "connect" which implements three-time
    shake hands and "send", "recv" and "accept" etc. Just for
    learning the internal of TCP/IP.

    I have got and have read chapter 13 "RAW Socket". :-)
    My trouble is I do not find some sample code about how
    to receive raw socket (raw socket input). In this book, it
    only deals with how to output raw sockets (Ping and Tracert
    demo). Can you help me to find the sample codes about how
    to receive raw socket under Win32 platform.


    regards,
    George

    Originally posted by kuphryn
    Do you want to simulate a network or do you want to design a network? You do not need sockets to simulate a network. As for a real network connection, yes, one solution is raw socket.

    As for code, I recommend that you learn winsock via books. I highly recommend Network Programming for Microsoft Windows, Second Edition by Anthony Jones and Jim Ohmund.

    Kuphryn

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured