establish a socket through a phone line

is there any body who guide me how can i establish a socket or any type of communication bridge through a phone line for sending data between to computer ?sample code may help me more than anything...
[214 byte] By [Ehsan_KhSa] at [2007-11-26 21:29:48]
# 1

What do you mean by "through a phone line"?

Actually if you make a call to ISP and get access to Internet you can use any network IP you want. This is "through a phone line".

If you talk about direct connect between two modems then you should think about comm package to access com port. This is "through a phone line" as well...

Michael.Nazarov@sun.coma at 2007-7-10 3:10:30 > top of Java-index,Archived Forums,Socket Programming...
# 2
dear michael,u r right, but the second is my desire , it make sense coneccting two comouter directly by modem...
Ehsan_KhSa at 2007-7-10 3:10:30 > top of Java-index,Archived Forums,Socket Programming...
# 3
Then I answered already. java.comm package will help you."ATDxxx" etc :)
Michael.Nazarov@sun.coma at 2007-7-10 3:10:30 > top of Java-index,Archived Forums,Socket Programming...
# 4
You have to connect a serial modem to your RS-232 port (serial port), and let it send/receive data over the phone line. As other guys said, you need to use java.comm package to communicate with serial port.
Arash.Shahkara at 2007-7-10 3:10:30 > top of Java-index,Archived Forums,Socket Programming...
# 5
Note that using the comm package means that you will not be using IP and thus not be using sockets.
jschella at 2007-7-10 3:10:30 > top of Java-index,Archived Forums,Socket Programming...
# 6

i've been living with this issues and discuss in this forum for some dark time.

the best way I can do is using RAS on windows (or other similar service on other OS) . Simply you have to configure your dialed computer to be able to accept incoming connection, on windows you can do this on "New Connection Wizard" by choosing "set up an advanced connection" option.

after that, you can dial a number connected on dialed computer, if dialing success, than a TCP/IP connection will be established. Then you can build java application to send/retrieve file or etc using socket.

or you can consider JDialUp API for this problem (this API help you to dial using java)

rterya at 2007-7-10 3:10:30 > top of Java-index,Archived Forums,Socket Programming...