Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-17-2008, 02:33 PM
Member
 
Join Date: Apr 2008
Posts: 2
madhumurundi is on a distinguished road
How To Make Socket Connection
hello, frndz i prepared code for socketprogramming ...its working in stand alone system but it is not working across the network...it is showing an exception.....socket is not creating..........i mentioned int port=6789; and hostname=localhost; so wt can i do???????????????????:
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-17-2008, 03:07 PM
Moderator
 
Join Date: Nov 2007
Posts: 1,079
Java Tip will become famous soon enoughJava Tip will become famous soon enough
What is the exception? May be that port is being used by another application on the system you are trying to test networking.
__________________
Want to make your IDE the best? Vote Now
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 04-17-2008, 06:07 PM
Member
 
Join Date: Apr 2008
Posts: 4
dream_noir is on a distinguished road
If the hostname your using is localhost then you aren't connecting across a network, you are trying to connect to the computer you're currently on. More information would be good, but if you don't have the client/server both running on your local computer and your trying to connect to localhost then well, it just won't work.
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 04-18-2008, 08:50 AM
Member
 
Join Date: Apr 2008
Posts: 2
madhumurundi is on a distinguished road
Quote:
Originally Posted by dream_noir View Post
If the hostname your using is localhost then you aren't connecting across a network, you are trying to connect to the computer you're currently on. More information would be good, but if you don't have the client/server both running on your local computer and your trying to connect to localhost then well, it just won't work.
while i connecting in across the network i changed localhost name to hostname of that machine....even though its not working..????
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 04-20-2008, 10:02 PM
Member
 
Join Date: Apr 2008
Posts: 4
dream_noir is on a distinguished road
What do you mean you changed localhost to the host name of the machine? Do you mean the IP address of the machine? You're probably going to need to post up some information about what you're trying to do and exactly how you're trying to do it.

What is the address of the remote machine your trying to connect to and on what port. Is it in the same network as you? Is the remote machine running a firewall? Things like that.
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 04-21-2008, 07:05 PM
CaptainMorgan's Avatar
Moderator
 
Join Date: Dec 2007
Location: NewEngland, US
Posts: 644
CaptainMorgan will become famous soon enoughCaptainMorgan will become famous soon enough
Send a message via AIM to CaptainMorgan
Quote:
Originally Posted by dream_noir View Post
What do you mean you changed localhost to the host name of the machine? Do you mean the IP address of the machine? You're probably going to need to post up some information about what you're trying to do and exactly how you're trying to do it.

What is the address of the remote machine your trying to connect to and on what port. Is it in the same network as you? Is the remote machine running a firewall? Things like that.
madhum, please do as advised by dream_noir... some code would also help too... you're prolonging the answer to your question by leaving out crucial information.
__________________
Want to voice your opinion on your IDE/Editor of choice? Vote now!
Got a little Capt'n in you? (drink responsibly)
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Software caused connection abort: socket write error kuguy Networking 0 03-10-2008 05:55 AM
Socket vortex New To Java 0 12-02-2007 04:39 PM
XML through a socket Heather XML 2 07-04-2007 10:31 AM
send files through socket bbq Advanced Java 1 06-05-2007 03:08 AM
How to make a HTTP connection to a website Alayna Networking 1 05-20-2007 12:58 PM


All times are GMT +3. The time now is 12:51 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org