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
> 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.
>> 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.
> 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
>>> 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
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++
> >>> 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
> 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?