|
CS101 Package Problem Set Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cs101.net.ServerWire
Networked Wire, Server Side. Provides readObject, writeObject.
If server's port is not provided at creation time, the user is prompted for this information using ServerDialog.
Copyright 1996 Massachusetts Institute of Technology
Wire
,
ClientWire
Constructor Summary | |
ServerWire()
How to make one, if we don't know who we want to talk to. |
|
ServerWire(int port)
How to make one, if we know the port. |
|
ServerWire(int port,
boolean verbose)
How to make one, if we know the port. |
Method Summary | |
protected void |
connectTo(int port)
Opens a connection to a server presumed to be listening on hostName, port. |
void |
finalize()
Closes the Socket. |
java.lang.Object |
readObject()
Use this to read an Object from the Wire. |
void |
writeObject(java.lang.Object o)
Use this method to write an Object to the Wire. |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ServerWire(int port, boolean verbose)
port
- the port number to listen onverbose
- toggle verbositypublic ServerWire(int port)
port
- the port number to listen onpublic ServerWire()
Method Detail |
protected void connectTo(int port)
port
- the port number on which the server is listeningpublic java.lang.Object readObject()
readObject
in interface Wire
public void writeObject(java.lang.Object o)
writeObject
in interface Wire
o
- The object to be written.public void finalize()
|
CS101 Package Problem Set Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |