H
hilz
hi
i am trying to create a socket as follows:
mailSocket = new Socket("localhost",8084); //tried with a lot of other port
numbers too
and i keep getting the exception:
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:452)
at java.net.Socket.connect(Socket.java:402)
at java.net.Socket.<init>(Socket.java:309)
at java.net.Socket.<init>(Socket.java:124)
at mail.Server.<init>(Server.java:28)
at mail.Server.main(Server.java:11)
what do i need to do to be able to successfully create a socket?
thanks
hilz
i am trying to create a socket as follows:
mailSocket = new Socket("localhost",8084); //tried with a lot of other port
numbers too
and i keep getting the exception:
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:452)
at java.net.Socket.connect(Socket.java:402)
at java.net.Socket.<init>(Socket.java:309)
at java.net.Socket.<init>(Socket.java:124)
at mail.Server.<init>(Server.java:28)
at mail.Server.main(Server.java:11)
what do i need to do to be able to successfully create a socket?
thanks
hilz