Sockets fundamentals

Closed Thread

Join Date: Jun 2004
Posts: 609
Reputation: freesoft_2000 is an unknown quantity at this point 
Solved Threads: 7
freesoft_2000 freesoft_2000 is offline Offline
Practically a Master Poster

Sockets fundamentals

 
0
  #1
Sep 30th, 2004
Hi everyone,
I have a problem with the fundamentals wit serversockets and sockets in java.
In the constructor of the java socket as shown below

Socket(InetAddress address, int port)

In the above constructor what do they mean by address?


In the below java constructor as shown below

Socket(String host, int port)

In the above constructor what do they mean by host?


In the constructor of the java serversockets

ServerSocket(int port, int backlog, InetAddress bindAddr)

In the above constructor what in the last argument?

and how do i create a host name that is unique to my computer. I am using
win 98 by the way.

What i am using currently is a dial up to my local isp and know nothing about it.

Basically what i want is to be able to create a unique host name on my computer and my friend that lives very far away from me and assuming that he already has the socket client application and what is he supposed to enter as his host name to be able to connect to my java serversocket on my computer.

For example the dial up company that i am using is firefox telecoms and the dial up company that my friend is using is jetset electronics.

Thus is there a way i can create an ip address unique to my computer whether online or offline.

I hope someone can help me answer these mysterious questions for me.

My e-mail is freesoft_2000@yahoo.com

Thank You

Yours Sincerely

Richard west
Quick reply to this message  
Join Date: Aug 2004
Posts: 153
Reputation: cosi is an unknown quantity at this point 
Solved Threads: 1
cosi's Avatar
cosi cosi is offline Offline
Junior Poster

Re: Sockets fundamentals

 
0
  #2
Oct 1st, 2004
This isn't a Java question. You must register with a service like DynDNS (http://www.dyndns.org/) if you have a dynamic IP (which most likely you have, static IP is usually the more expensive business option). You can find out more information about how to set this up at the dyndns website.

Your friend will only be able to access your computer if it is online.

Moderator: please move this thread to "Web Technologies" or "Web Hosting".


Ed

Originally Posted by freesoft_2000
Hi everyone,
I have a problem with the fundamentals wit serversockets and sockets in java.
In the constructor of the java socket as shown below

Socket(InetAddress address, int port)

In the above constructor what do they mean by address?


In the below java constructor as shown below

Socket(String host, int port)

In the above constructor what do they mean by host?


In the constructor of the java serversockets

ServerSocket(int port, int backlog, InetAddress bindAddr)

In the above constructor what in the last argument?

and how do i create a host name that is unique to my computer. I am using
win 98 by the way.

What i am using currently is a dial up to my local isp and know nothing about it.

Basically what i want is to be able to create a unique host name on my computer and my friend that lives very far away from me and assuming that he already has the socket client application and what is he supposed to enter as his host name to be able to connect to my java serversocket on my computer.

For example the dial up company that i am using is firefox telecoms and the dial up company that my friend is using is jetset electronics.

Thus is there a way i can create an ip address unique to my computer whether online or offline.

I hope someone can help me answer these mysterious questions for me.

My e-mail is freesoft_2000@yahoo.com

Thank You

Yours Sincerely

Richard west
In a world without walls or fences,
What use are Windows and Gates.
Quick reply to this message  
Join Date: Dec 2003
Posts: 2,414
Reputation: alc6379 has a spectacular aura about alc6379 has a spectacular aura about alc6379 has a spectacular aura about 
Solved Threads: 123
Team Colleague
alc6379's Avatar
alc6379 alc6379 is offline Offline
Cookie... That's it

Re: Sockets fundamentals

 
0
  #3
Oct 1st, 2004
Originally Posted by cosi
This isn't a Java question. You must register with a service like DynDNS (http://www.dyndns.org/) if you have a dynamic IP (which most likely you have, static IP is usually the more expensive business option). You can find out more information about how to set this up at the dyndns website.

Your friend will only be able to access your computer if it is online.

Moderator: please move this thread to "Web Technologies" or "Web Hosting".


Ed
Actually, I need to close this one. I looked over it, and what little Java I know, I can tell, too that this isn't a programming question. Since he already asked this exact same question in Networking, and I answered it there, I'll just close this post.
Alex Cavnar, aka alc6379
Quick reply to this message  
Closed Thread

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC