Thread: Sockets

  1. #1
    Registered User gavra's Avatar
    Join Date
    Jun 2008
    Posts
    265

    Sockets

    I am using dev C++ on windows and I would like to know how to use sockets.
    It supposed to be simple but I guess it's not a small issue so I'll explain what I am traying to do:
    I build the game x mix drix and I would like to add "online playing" option.
    I am sure you all know this game so what do I need to know? and where should I start?

    Thanks (:
    gavra.

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    I believe this is the best tutorial.
    http://www.beej.us/guide/bgnet/

    I think you need to learn about structs and a passing variables as pointers first, since I have seen you struggle with those concepts in your posts. Understanding how basic things works is essential to get further in programming.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Registered User gavra's Avatar
    Join Date
    Jun 2008
    Posts
    265
    I do know structs and pointers I just don't use them (maybe pointers sometimes..)
    Anyway I'll check those issues again.

    Humm thanks fo the link but with what should I begin with?
    gavra.

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by gavra View Post
    I do know structs and pointers I just don't use them (maybe pointers sometimes..)
    Anyway I'll check those issues again.

    Humm thanks fo the link but with what should I begin with?
    Reading the first page of the guide that I linked, perhaps?

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  5. #5
    Registered User gavra's Avatar
    Join Date
    Jun 2008
    Posts
    265
    What it means? ( "HTML" "PDF" and "postscript" )
    gavra.

  6. #6
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by gavra View Post
    What it means? ( "HTML" "PDF" and "postscript" )
    If you want to read it online, use the HTML version. If you want to read/print it locally, then PDF version is probably what you want. If you have Linux and want to print it locally, you can also use the postscript version.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  7. #7
    Registered User gavra's Avatar
    Join Date
    Jun 2008
    Posts
    265
    ohh lol kk [:
    Thank you very much.
    gavra.

  8. #8
    Registered User gavra's Avatar
    Join Date
    Jun 2008
    Posts
    265
    Humm how can I say it.. maybe "WTF?" 85 pages???!?!?!??!?! damnn
    Should I know everything? ><"
    I tend to be lazy somethimes.. XD
    gavra.

  9. #9
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    only 85 pages? hmm, maybe it doesnt go into too much detail.

  10. #10
    Registered User gavra's Avatar
    Join Date
    Jun 2008
    Posts
    265
    LOL you guys are crazy
    It's just one subject (my all book is less then 500)
    gavra.

  11. #11
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by gavra View Post
    LOL you guys are crazy
    It's just one subject (my all book is less then 500)
    And you can probably find a couple of books on "how to program with sockets" that are about 500 pages each too. It's not an entirely trivial subject, so 85 pages will be a short description of the most important aspects, not a complete setup.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  12. #12
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    I have a book that is 1200 pages long that is just about the protocols used on TCP/IP. I think 85 pages is a pretty compact tutorial. If you dont like to read, you are probably going to have a hard time in programming.

    Oh, and sanity is for people that can't handle going a little crazy in order to solve a problem. Some of my most brilliant code was written while i was stark raving mad.

  13. #13
    Registered User gavra's Avatar
    Join Date
    Jun 2008
    Posts
    265
    Ok you both convinced me (1200 pages??!?!?! just TCP/IP?!?)
    I do like to read but I have my reasons this time.

    Thanks I'll work on it.
    gavra.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Best way to poll sockets?
    By 39ster in forum Networking/Device Communication
    Replies: 3
    Last Post: 07-22-2008, 01:43 PM
  2. Cross platform sockets
    By zacs7 in forum Networking/Device Communication
    Replies: 5
    Last Post: 06-27-2007, 05:16 AM
  3. multiple UDP sockets with select()
    By nkhambal in forum Networking/Device Communication
    Replies: 2
    Last Post: 01-17-2006, 07:36 PM
  4. Raw Sockets and SP2...
    By Devil Panther in forum Networking/Device Communication
    Replies: 11
    Last Post: 08-12-2005, 04:52 AM
  5. Starting window sockets
    By _Cl0wn_ in forum Windows Programming
    Replies: 2
    Last Post: 01-20-2003, 11:49 AM