[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Port and Chat Client

Posted on 2005-04-10
3
Medium Priority
?
829 Views
Last Modified: 2012-05-05
I just have some questions about ports and chat clients.

I am aware that if someone from the outside tries to talk to a port on my machine I need to make sure it routes to the right machine and port in my router, the firewall lets it through etc..

But what I do not know is what happens when the communication is initiated from the other side, for example;
I have created a chat server and chat client in Java, the chat server listens on port 8010, so the client tries to communicate to port 8010 on my server, I am thinking that the client will not have to do anything and is just able to always reach my port 8010, am I correct?

Are there any ports that I should be using?
0
Comment
Question by:Tacobell777
  • 2
3 Comments
 
LVL 6

Expert Comment

by:Rafaelkl
ID: 13750096
client port is dynamic in every session. so client just connect to server, that's enough. Is that what you want ?
0
 
LVL 6

Accepted Solution

by:
Rafaelkl earned 2000 total points
ID: 13750124
sorry, better description should be this:
client port is dynamic allocated when every session(a connection to server) start, and be hold on the whole specific session lifetime.
In UDP diagram mode, client just send data, that's ok.
In TCP stream mode, client first connect server, server can deside accept connection or not. if server accept connection, server send back a package to notify client connection is build. then client and server can send data to opposite end.
0
 
LVL 23

Expert Comment

by:sciwriter
ID: 13750198
Short answer -- the "other end" has no idea what is going on.  All their client software sees is an IP address to communicate to.  They cannot see the cable/dsl modem, they cannot see the router, all the SW does is send a request on port 8010 -- and waits for the "right" answer.  Once it gets the answer it expects, a series of protocol discussions occur where one computer running the right software dialogs with the other computer running compatible "chat" software, and once all the dialog hurdles are passed, the two computers are talking to one another.  All the router does is PASS THROUGH the data on the ports that you tell it to pass, directly to the IP you tell it to send the data to.  That is ALL the router does.

The selection of how many ports to open and which numbers, depends ENTIRELY on the requirements of the chat software.  Depending on what you use, it might use different ports, and you need to discover from the software exactly what these port numbers are for the software to work.  Realize, that if two people have different chat software on different ports, it can still work, because the software is set up to scan "all ports" for compatible software, each type perhaps using a different port range or topology.
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
Make the most of your online learning experience.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question