29-06-2015, 20:38
|
|
|
חבר מתאריך: 11.02.04
הודעות: 16,543
|
|
עריכה... מאחר שאני לא מבין גדול ברשתות(למעשה לא ידעתי על זה כלום פחות או יותר עד לפני כמה ימים), לא ידעתי עד כמה אני טועה.
ציטוט:
So as I understand it theres actuall two different ports used when a user sends data; first the port he has bind() (the client's 'private' port) and the actual port he is sending on (the client's 'public' port). So I need to tell each client what the other clients Public ports are, it wouldn't work to if they try to communicate with their Private port? (for example I bind() all ports to 12340, other clients cant just send stuff to other clients IP + 12340?) – KaiserJohaan Jan 24 '11 at 11:14
@Kaiser, usually it won't work. You'll have to figure out which public port is mapped to your private port. As far as I understand it, it is done by first sending something to a server from this private port, then the server tells this port to both sides. But it is still worth trying to communicate to the private port, using the private IP too. This will work if both clients accidentally happen to be behind the same NAT so they can communicate through the LAN. – Sergey Tachenov Jan 24 '11 at 11:25
|
עכשיו כל הקטע הזה של הניחושים באיזה פורט פומבי פנה השרת, באמת כבר נראה לי בכלל לא פרקטי, אם אני טועה אשמח להסבר. (האם קיים באמת מנגנון טוב שיודע לנבא).
בכמה לדעתכם מקרים(באחוזים אלגוריתם כזה עשוי לעבוד?), אני מניח, שאם המימוש לא מסובך מדי(והוא לא אמור להיות), אז גם אם הורדתי 50% מהעומס של השרת זה יהיה שווה, אבל אם מדובר במספרים זנחים, ולרוב זה לא מצליח, אני ארד מזה, ואלח לרלי דרך השרת. למשהו יש כאן מספרים אמתיים, עד כמה כל העסק הזה הוא בכלל פרקטי?(במיוחד מעניינות אותי רשתות ה3G, ממה שהספקתי להבין, שם האלגוריתמים של החזוי, עובדים הרבה פחות טוב..)
תודה מראש.
נערך לאחרונה ע"י The_Equivocator בתאריך 29-06-2015 בשעה 20:52.
|