Results 1 to 6 of 6
Thread: socket programming
- 11-26-2008, 09:16 PM #1
Member
- Join Date
- Oct 2008
- Posts
- 25
- Rep Power
- 0
- 11-26-2008, 11:35 PM #2
Unpack the sources, google for sample code ( not all of which will be good code )Java Code:/** * Creates a stream socket and connects it to the specified port * number on the named host. * <p> * If the specified host is <tt>null</tt> it is the equivalent of * specifying the address as <tt>{@link java.net.InetAddress#getByName InetAddress.getByName}(null)</tt>. * In other words, it is equivalent to specifying an address of the * loopback interface. </p> * <p> * If the application has specified a server socket factory, that * factory's <code>createSocketImpl</code> method is called to create * the actual socket implementation. Otherwise a "plain" socket is created. * <p> * If there is a security manager, its * <code>checkConnect</code> method is called * with the host address and <code>port</code> * as its arguments. This could result in a SecurityException. * * @param host the host name, or <code>null</code> for the loopback address. * @param port the port number. * * @exception UnknownHostException if the IP address of * the host could not be determined. * * @exception IOException if an I/O error occurs when creating the socket. * @exception SecurityException if a security manager exists and its * <code>checkConnect</code> method doesn't allow the operation. * @see java.net.Socket#setSocketImplFactory(java.net.SocketImplFactory) * @see java.net.SocketImpl * @see java.net.SocketImplFactory#createSocketImpl() * @see SecurityManager#checkConnect */ public Socket(String host, int port) throws UnknownHostException, IOExceptionIntroduction to Programming Using Java.
Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor
- 11-27-2008, 12:40 AM #3
Tutorial...
Chris S.
Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.
- 12-01-2008, 08:17 PM #4
Member
- Join Date
- Oct 2008
- Posts
- 25
- Rep Power
- 0
thank u so so much cjsl , that was so helpfull.
- 12-01-2008, 10:34 PM #5
Any time...
You're welcome...
CJSLChris S.
Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.
- 12-18-2008, 04:58 PM #6
Member
- Join Date
- Oct 2008
- Posts
- 25
- Rep Power
- 0
Similar Threads
-
Socket programming
By ikoko in forum New To JavaReplies: 1Last Post: 10-16-2008, 02:50 PM -
Socket programming - port issues
By ravian in forum NetworkingReplies: 2Last Post: 11-07-2007, 10:24 AM -
Programming Socket Question
By paul in forum NetworkingReplies: 1Last Post: 07-30-2007, 07:26 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks