C and C++

Moderators: None (Apply to moderate this forum)
Number of threads: 28691
Number of posts: 94711

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
how does yahoo! (tm) do it? Posted by Gregry2 on 13 Oct 2005 at 10:15 PM
i was err am thinking over an intranet messaging program, which now is turning into a primitive chat program...then came a thought into my head...multiple IMs..err, not exactly ims but like conversations...the only thing i can think of is by usesing a heap of ports, each exclusively for each IM, bad isnt it?

Im thinking, is Yahoo! and the rest using a like timed thing, in which it uses the same port but sends one im's message bundled with another's message when one is sent, or when one is recieved, it bundles that with other at the same time and send it to you?

okay, that made no sense. I guess i'll just have to limit the number of simultaneouly sent messages or somthing...

well, thanx for the facts and opinions
{2}rIng
Report
Re: how does yahoo! (tm) do it? Posted by DB1 on 14 Oct 2005 at 2:31 AM
: i was err am thinking over an intranet messaging program, which now is turning into a primitive chat program...then came a thought into my head...multiple IMs..err, not exactly ims but like conversations...the only thing i can think of is by usesing a heap of ports, each exclusively for each IM, bad isnt it?
:
: Im thinking, is Yahoo! and the rest using a like timed thing, in which it uses the same port but sends one im's message bundled with another's message when one is sent, or when one is recieved, it bundles that with other at the same time and send it to you?
:
: okay, that made no sense. I guess i'll just have to limit the number of simultaneouly sent messages or somthing...
:
: well, thanx for the facts and opinions
: {2}rIng
:


No, only one connection with the main chat server is necessary. The chat server relays messages to you from your friends. The individual messages would include a userid or some sort of way to identify from whom the message came from. Your chat client would display messages from individual sources in their own IM window.


To understand recursive, first you need to understand recursive

Report
Re: how does yahoo! (tm) do it? Posted by Gregry2 on 14 Oct 2005 at 6:49 AM
: : i was err am thinking over an intranet messaging program, which now is turning into a primitive chat program...then came a thought into my head...multiple IMs..err, not exactly ims but like conversations...the only thing i can think of is by usesing a heap of ports, each exclusively for each IM, bad isnt it?
: :
: : Im thinking, is Yahoo! and the rest using a like timed thing, in which it uses the same port but sends one im's message bundled with another's message when one is sent, or when one is recieved, it bundles that with other at the same time and send it to you?
: :
: : okay, that made no sense. I guess i'll just have to limit the number of simultaneouly sent messages or somthing...
: :
: : well, thanx for the facts and opinions
: : {2}rIng
: :
:
:
: No, only one connection with the main chat server is necessary. The chat server relays messages to you from your friends. The individual messages would include a userid or some sort of way to identify from whom the message came from. Your chat client would display messages from individual sources in their own IM window.
:
:
: To understand recursive, first you need to understand recursive ...
void foo(){foo();}....

:
:

just joking..

lets say two different people send me a message. The main server sends both in the order they came...of course, every other connection is that isnt accept()'d is queued right?

hav i got it?

thanx
{2}rIng


Report
Re: how does yahoo! (tm) do it? Posted by DB1 on 14 Oct 2005 at 3:49 PM
: : : i was err am thinking over an intranet messaging program, which now is turning into a primitive chat program...then came a thought into my head...multiple IMs..err, not exactly ims but like conversations...the only thing i can think of is by usesing a heap of ports, each exclusively for each IM, bad isnt it?
: : :
: : : Im thinking, is Yahoo! and the rest using a like timed thing, in which it uses the same port but sends one im's message bundled with another's message when one is sent, or when one is recieved, it bundles that with other at the same time and send it to you?
: : :
: : : okay, that made no sense. I guess i'll just have to limit the number of simultaneouly sent messages or somthing...
: : :
: : : well, thanx for the facts and opinions
: : : {2}rIng
: : :
: :
: :
: : No, only one connection with the main chat server is necessary. The chat server relays messages to you from your friends. The individual messages would include a userid or some sort of way to identify from whom the message came from. Your chat client would display messages from individual sources in their own IM window.
: :
: :
: : To understand recursive, first you need to understand recursive ...
: void foo(){foo();}....

: :
: :
:
: just joking..
:
: lets say two different people send me a message. The main server sends both in the order they came...of course, every other connection is that isnt accept()'d is queued right?
:
: hav i got it?
:
: thanx
: {2}rIng
:
:
:


I don't understand what you'r asking.. you don't need to accept() anything since you're already connected to the main server and are just receiving relayed messages from it.


To understand recursive, first you need to understand recursive

Report
Re: how does yahoo! (tm) do it? Posted by Gregry2 on 15 Oct 2005 at 2:26 AM
: : : : i was err am thinking over an intranet messaging program, which now is turning into a primitive chat program...then came a thought into my head...multiple IMs..err, not exactly ims but like conversations...the only thing i can think of is by usesing a heap of ports, each exclusively for each IM, bad isnt it?
: : : :
: : : : Im thinking, is Yahoo! and the rest using a like timed thing, in which it uses the same port but sends one im's message bundled with another's message when one is sent, or when one is recieved, it bundles that with other at the same time and send it to you?
: : : :
: : : : okay, that made no sense. I guess i'll just have to limit the number of simultaneouly sent messages or somthing...
: : : :
: : : : well, thanx for the facts and opinions
: : : : {2}rIng
: : : :
: : :
: : :
: : : No, only one connection with the main chat server is necessary. The chat server relays messages to you from your friends. The individual messages would include a userid or some sort of way to identify from whom the message came from. Your chat client would display messages from individual sources in their own IM window.
: : :
: : :
: : : To understand recursive, first you need to understand recursive ...
: : void foo(){foo();}....

: : :
: : :
: :
: : just joking..
: :
: : lets say two different people send me a message. The main server sends both in the order they came...of course, every other connection is that isnt accept()'d is queued right?
: :
: : hav i got it?
: :
: : thanx
: : {2}rIng
: :
: :
: :
:
:
: I don't understand what you'r asking.. you don't need to accept() anything since you're already connected to the main server and are just receiving relayed messages from it.
:
:
: To understand recursive, first you need to understand recursive
:
:

yeah, erg, im getting confused, sorry.

Do you think connectionless is okay for it?
{2}rIng
Report
Re: how does yahoo! (tm) do it? Posted by DB1 on 15 Oct 2005 at 4:13 AM
: : :
: : : lets say two different people send me a message. The main server sends both in the order they came...of course, every other connection is that isnt accept()'d is queued right?
: : :
: : : hav i got it?
: : :
: : : thanx
: : : {2}rIng
: : :
: : :
: : :
: :
: :
: : I don't understand what you'r asking.. you don't need to accept() anything since you're already connected to the main server and are just receiving relayed messages from it.
: :
: :
: : To understand recursive, first you need to understand recursive
: :
: :
:
: yeah, erg, im getting confused, sorry.
:
: Do you think connectionless is okay for it?
: {2}rIng
:

Sorry, don't mean to confuse you.

In most Instant Messenger programs you connect to a main chat server. You send and receive packets with only this main chat server. When your friend sends you a message, you don't accept any socket connections from him, you simply get a packet which is sent from him to the main server, then relayed from the main server to you. When you send him a message, you send it to the main chat server which relays the message to your friend. You are never actually connected to your friend directly.


And no, I don't think connectionless is ok for much of anything really. You want to make sure the messages are delivered.








To understand recursive, first you need to understand recursive




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.