Results 1 to 14 of 14

Thread: Please help with TCP/IP

  1. #1

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827

    Please help with TCP/IP

    Hi, I am trying to make a messenger using winsock and TCP/IP.
    I just want to know that let us when the server is ofline and the client sends a message to the server. Will TCP/IP save this message and when the server becomes online, it will give that message to the server?
    Baaaaaaaaah

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    No. The packets will bounce around for a bit before timing out, and an ICMP Unreachable packet will be returned to you.

    PS: TCP/IP is probably the most complex networking protocol in the history of communications so I didn't bother trying to understand it too much, so I gave a fairly high-level answer.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    I think that when msn shows you the message that certain person is online, does it have any kind of information on the centeral server?

    I am thinking:

    When the client use the chat program (mine), he sends the signals to all of the other clients and the server that he is online. And let us if I am not online, I dont recieve the signal. But When I come online, I also send the signal to all of hte clients that I am now online.

    Will that method work as msn sends the signals between clients?

    ohh..forgot to ask that.. Can I use the chat program as both server and client? I just use two sockets - one to recieve calls and the other one to sends calls?
    Baaaaaaaaah

  4. #4
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    I don't know the details of the MSN protocol, but I recall someone posting a link to some details about it. It's in Internet Draft stage so that might help find something.

    You'd probably need a socket per individual conversation, and one for the control (to the server).
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  5. #5

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    I will try to find some way of chatting like msn.

    I dont know why I am calling the program *a server* but I dont have any server. I just want people to contact each using the chat program

    So they can be server and client at the same time
    Baaaaaaaaah

  6. #6
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Most chat systems use a central server to store details of currently online users, and their IP addresses. This solves the problem of synchronisation between different users. For example - User A goes online. User B goes online. User B does not know User A's IP address, and so doesn't inform user A.

    They cannot chat
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  7. #7

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    I forgot that I will just make a simple one that asks the user to enter the ip address!

    And by the way, What about the computer name? I think there are more than 1 computers with the same name..right? So do I use IP address or a computer name to connect to a machine?
    Baaaaaaaaah

  8. #8
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Use IP address. Although they should be able to enter a hostname - just resolve it to the address.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  9. #9

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    But I am wondering what if there are more than one computers with the same hostname.
    Baaaaaaaaah

  10. #10
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    I don't think that's possible.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  11. #11

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    Woo!!

    Then let us if I have two computers with the same hostnames (hostname: oemcomputer) then what do you think will happen
    Baaaaaaaaah

  12. #12
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    I meant fully qualified host names. For example, I'm connecting through Freeserve (an ISP over here), and my current hostname is: modem-54.white-faced-ibis.dialup.pol.co.uk

    I think the DNS system rejects multiple hostnames - it would just reassign the IP address to whichever name was set last.

    Or are you confusing hostnames with NetBIOS computer names? If you were running this on a local network (no DNS) and you had two computers called "oemcomputer", then neither would work.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  13. #13
    Fanatic Member gwdash's Avatar
    Join Date
    Aug 2000
    Location
    Minnesota
    Posts
    666
    according to the MSN protocol, MSN doesn't establish a direct connection between chat clients except for voice chat, for text chat, everything is routed through what they call a "Switchboard Server", that passes traffic from person to person, allowing more that two people to chat together easily.
    Last edited by gwdash; Aug 12th, 2001 at 11:20 AM.
    GWDASH
    [b]VB6, Perl, ASP, HTML, JavaScript, VBScript, SQL, C, C++, Linux , Java, PHP, MySQL, XML[b]

  14. #14
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Ah...so that would be why Trillian occasionally says "lost connection to switchboard"

    This is the annoying thing about MS - they do get some nice stuff done...but you never see much of it
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

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