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 / December 2004

Tip: Looking for answers? Try searching our database.

Passing java sockets impossible?

Thread view: 
Nekom - 24 Dec 2004 15:05 GMT
   Is it REALLY impossible to pass java sockets to external programs in
any way?  Is there no socket handle, as in c?  If anyone knows of a way
to do this in java, or can confirm that it is absolutely impossible, it
would be a ton of help.  Thanks

   - Luke
Ryan Stewart - 24 Dec 2004 17:15 GMT
>    Is it REALLY impossible to pass java sockets to external programs in
> any way?  Is there no socket handle, as in c?  If anyone knows of a way to
> do this in java, or can confirm that it is absolutely impossible, it would
> be a ton of help.  Thanks

According to whom is it impossible? I've never tried anything of the sort,
but since there must be an actual connection somewhere, surely there's a way
to get to it. You may have to write some native code, but it would seem
there has to be a way.
Brett Foster - 24 Dec 2004 20:28 GMT
>>   Is it REALLY impossible to pass java sockets to external programs in
>>any way?  Is there no socket handle, as in c?  If anyone knows of a way to
>>do this in java, or can confirm that it is absolutely impossible, it would
>>be a ton of help.  Thanks

No.

> According to whom is it impossible? I've never tried anything of the sort,
> but since there must be an actual connection somewhere, surely there's a way
> to get to it. You may have to write some native code, but it would seem
> there has to be a way.

It's not impossible. One could simply build his or her own socket
implementation and use that and provide documented hooks to get at the
information.

Otherwise it's also not impossible, but hard, painful, insane, and not
worth the effort... It's also likely not stable between revisions.

Brett
Nekom - 25 Dec 2004 17:30 GMT
>>>   Is it REALLY impossible to pass java sockets to external programs
>>> in any way?  Is there no socket handle, as in c?  If anyone knows of
[quoted text clipped - 16 lines]
>
> Brett

   Well what I'm trying to do is to write a java based telnet BBS
system.  And it will need support for external programs, such as door
games.  Modern door games use a drop file that contains a number, which
is the socket handle, which they use to take over the connection.  Now
I've come up with an idea for a very convoluted workaround, but I was
hoping that there was an easier way.  I'm not at all familiar with how
java deals with sockets internally, but it doesn't look like the socket
handle is readily available.  Well if I can't make it work, I may have
to abandon the idea and revert to c++
Jose Solorzano - 28 Dec 2004 13:49 GMT
> >>>   Is it REALLY impossible to pass java sockets to external programs
> >>> in any way?  Is there no socket handle, as in c?  If anyone knows of
[quoted text clipped - 19 lines]
>     Well what I'm trying to do is to write a java based telnet BBS
> system.  And it will need support for external programs, such as door

> games.  Modern door games use a drop file that contains a number, which
> is the socket handle, which they use to take over the connection.  Now
> I've come up with an idea for a very convoluted workaround, but I was

> hoping that there was an easier way.  I'm not at all familiar with how
> java deals with sockets internally, but it doesn't look like the socket
> handle is readily available.  Well if I can't make it work, I may have
> to abandon the idea and revert to c++

SocketImpl has getFileDescriptor() but it's protected.

Can these door games use standard input/output or listen
on a specific port number?

Jose Solorzano
Dirk Gerrit Oort - 25 Dec 2004 10:21 GMT
when you want contact a c++ programm, why don't you use CORBA

Signature

D.G. Oort

>    Is it REALLY impossible to pass java sockets to external programs in
> any way?  Is there no socket handle, as in c?  If anyone knows of a way to
> do this in java, or can confirm that it is absolutely impossible, it would
> be a ton of help.  Thanks
>
>    - Luke


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.