Those were not my friends. They are just my cluster.
If you get too involved with people, you will only have troubles.
If you trust people, you will be betrayed.
The more you rely on them, the more your life becomes a mess.
That is why I do not expect anything from anybody.
I do not trust anyone.
That is my lifestyle.
Those were not my friends. They are just my cluster.
If you get too involved with people, you will only have troubles.
If you trust people, you will be betrayed.
The more you rely on them, the more your life becomes a mess.
That is why I do not expect anything from anybody.
I do not trust anyone.
That is my lifestyle.
java.net
-stream-based
-connection-based
-tcp
-packet-based
-connectionless
-udp
create server:
1.create ServerSocket object
ServerSocket server = new ServerSocket(port#,queueLength);
2.Server sistin an infinite loop to wait 4 client to connect
Socket connec = server.accept();
3.create streams
connec getInputStream()
connec getOutputStream()
4.processes
Application specific
5. close socket and streams
====================================
localhost: ip: 127.0.0.1
readObject()
====================================
create client
1.create socket(connection) to server
Socket connection = new socket(severAddress,port#);
2.create or get input/outputStream
connection.getInputStream()
connection.getOutputStream()
3.processing the connection
4.close socket and streams
CLASSPATH
.;.\;C:\Program Files\Java\jre1.6.0_02\lib\ext\QTJava.zip
JAVA_HOME
C:\Program Files\Java\jdk1.5.0_07
PATH
C:\Program Files\Java\jre1.6.0_02\bin;C:\Program Files\Java\jdk1.5.0_07\bin
QTJAVA
C:\Program Files\Java\jre1.6.0_02\lib\ext\QTJava.zip
javac: $File java: $BaseName appletviewer.exe: $BaseName
javac: ^\(\(\(.[^:]\)\|\([A-Za-z]:\)\)[^:]+\):\([0-9]+\):
JUST 雁过留声 thx