Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / August 2004

Tip: Looking for answers? Try searching our database.

How to open a socket with username/password?

Thread view: 
Lior - 29 Aug 2004 15:03 GMT
Hi all,

I need to open a socket to an IP address which requires username and
password to log in. I use:

Socket socket = new Socket(host, port)

How do I enter the username and password to this socket instance?

Please help.

Thanks, Lior
Gregory Toomey - 29 Aug 2004 15:50 GMT
> Hi all,
>
[quoted text clipped - 8 lines]
>
> Thanks, Lior

You dont. Opening sockets has nothing to do with userid/password.

gtoomey
Nick Pomfret - 30 Aug 2004 12:03 GMT
> Hi all,
>
[quoted text clipped - 8 lines]
>
> Thanks, Lior

Sockets don't require authentication in the way you've described.  Where
exactly are you asked for a username/password? Is it when you visit that
location in your web browser?

Signature

** http://www.tabletoolkit.com **
Aggregate a JTable to an arbitrary level to create your own pivot tables

Madhur Ahuja - 30 Aug 2004 13:31 GMT
> Hi all,
>
[quoted text clipped - 8 lines]
>
> Thanks, Lior

Hello

As other said, sockets do not require authentication. The password might be
demanded by the process running behind the socket, such as if you are
connecting to telnet socket port 23.

Connect to the socket, and then send the username and password as strings.

--
Winners dont do different things, they do things differently.

Madhur Ahuja
India

Homepage : http://madhur.netfirms.com
Email    : madhur<underscore>ahuja<at>yahoo<dot>com


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.