diff --git a/.classpath b/.classpath
index 582029f..71ba817 100644
--- a/.classpath
+++ b/.classpath
@@ -4,7 +4,11 @@
| -io.socket.* | -
|---|
- -
| io.socket.io.socket.IOConnection | -||
|---|---|---|
-public static final java.lang.String |
-SOCKET_IO_1 |
-"/socket.io/1/" |
-
- -
- -
| io.socket.io.socket.IOMessage | -||
|---|---|---|
-public static final int |
-FIELD_DATA |
-3 |
-
-public static final int |
-FIELD_ENDPOINT |
-2 |
-
-public static final int |
-FIELD_ID |
-1 |
-
-public static final int |
-FIELD_TYPE |
-0 |
-
-public static final int |
-NUM_FIELDS |
-4 |
-
-public static final int |
-TYPE_ACK |
-6 |
-
-public static final int |
-TYPE_CONNECT |
-1 |
-
-public static final int |
-TYPE_DISCONNECT |
-0 |
-
-public static final int |
-TYPE_ERROR |
-7 |
-
-public static final int |
-TYPE_EVENT |
-5 |
-
-public static final int |
-TYPE_HEARTBEAT |
-2 |
-
-public static final int |
-TYPE_JSON_MESSAGE |
-4 |
-
-public static final int |
-TYPE_MESSAGE |
-3 |
-
-public static final int |
-TYPE_NOOP |
-8 |
-
- -
- -
| io.socket.io.socket.WebsocketTransport | -||
|---|---|---|
-public static final java.lang.String |
-TRANSPORT_NAME |
-"websocket" |
-
- -
- -
| io.socket.io.socket.XhrTransport | -||
|---|---|---|
-public static final java.lang.String |
-TRANSPORT_NAME |
-"xhr-polling" |
-
- -
SocketIO.headers
IOConnection.
-IOConnection.
SocketIO to the IOTransport.
IOCallbacks and shuts down.
+
+
|
++ + | +||||||||
| + PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
| + SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +||||||||
+java.lang.Object ++io.socket.AllTests +
public class AllTests
+
| +Constructor Summary | +|
|---|---|
AllTests()
+
++ |
+|
| +Method Summary | +
|---|
| Methods inherited from class java.lang.Object | +
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
| +Constructor Detail | +
|---|
+public AllTests()+
+
+
|
++ + | +||||||||
| + PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
| + SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +||||||||
voidack(java.lang.Object... args)
+ack(Object... args)
-void ack(java.lang.Object... args)+void ack(Object... args)
diff --git a/doc/io/socket/IOCallback.html b/doc/io/socket/IOCallback.html index 3ae3747..3dfb49e 100644 --- a/doc/io/socket/IOCallback.html +++ b/doc/io/socket/IOCallback.html @@ -2,12 +2,12 @@
- + voidon(java.lang.String event,
+on(String event,
IOAcknowledge ack,
- java.lang.Object... args)
+ Object... args)
On [Event].
@@ -158,7 +158,7 @@
void
-onMessage(java.lang.String data,
+onMessage(String data,
IOAcknowledge ack)
@@ -207,7 +207,7 @@
onMessage
-void onMessage(java.lang.String data,
+void onMessage(String data,
IOAcknowledge ack)
- On message. Called when the server sends String data.
@@ -235,9 +235,9 @@
on
-void on(java.lang.String event,
+void on(String event,
IOAcknowledge ack,
- java.lang.Object... args)
+ Object... args)
- On [Event]. Called when server emits an event.
@@ -289,7 +289,7 @@
PREV CLASS
- NEXT CLASS
+ NEXT CLASS
FRAMES
NO FRAMES
diff --git a/doc/io/socket/SocketIO.html b/doc/io/socket/SocketIO.html
index bfcde40..8c76e65 100644
--- a/doc/io/socket/SocketIO.html
+++ b/doc/io/socket/SocketIO.html
@@ -2,12 +2,12 @@
-
+
SocketIO
-
+
@@ -54,7 +54,7 @@
- PREV CLASS
+ PREV CLASS
NEXT CLASS
FRAMES
@@ -91,12 +91,12 @@
Class SocketIO
-java.lang.Object
+java.lang.Object
io.socket.SocketIO
-public class SocketIO
- extends java.lang.Object
+public class SocketIO
- extends Object
@@ -123,26 +123,34 @@
Instantiates a new socket.io connection.
-SocketIO(java.lang.String url)
+SocketIO(String url)
Instantiates a new socket.io connection.
-SocketIO(java.lang.String url,
+SocketIO(String url,
IOCallback callback)
Instantiates a new socket.io object and connects to the given url.
-SocketIO(java.net.URL url)
+SocketIO(String url,
+ Properties headers)
+
+
+ Instantiates a new socket.io connection and sets the request headers used
+ while connecting the first time for authorizing.
+
+
+SocketIO(URL url)
Instantiates a new socket.io connection.
-SocketIO(java.net.URL url,
+SocketIO(URL url,
IOCallback callback)
@@ -160,6 +168,15 @@
+ SocketIO
+addHeader(String key,
+ String value)
+
+
+ Adds an header to the headers
+
+
+
void
connect(IOCallback callback)
@@ -169,7 +186,7 @@
void
-connect(java.lang.String url,
+connect(String url,
IOCallback callback)
@@ -178,7 +195,7 @@
void
-connect(java.net.URL url,
+connect(URL url,
IOCallback callback)
@@ -195,9 +212,9 @@
void
-emit(java.lang.String event,
+emit(String event,
IOAcknowledge ack,
- java.lang.Object... args)
+ Object... args)
Emits an event to the Socket.IO server.
@@ -205,8 +222,8 @@
void
-emit(java.lang.String event,
- java.lang.Object... args)
+emit(String event,
+ Object... args)
Emits an event to the Socket.IO server.
@@ -221,7 +238,23 @@
- java.lang.String
+ String
+getHeader(String key)
+
+
+ Returns the header value
+
+
+
+ Properties
+getHeaders()
+
+
+ Returns the headers used while handshaking.
+
+
+
+ String
getNamespace()
@@ -229,6 +262,14 @@
+ String
+getTransport()
+
+
+ Returns the name of the used transport
+
+
+
boolean
isConnected()
@@ -256,7 +297,7 @@
void
send(IOAcknowledge ack,
- java.lang.String message)
+ String message)
Send JSON data to the Socket.io server.
@@ -272,7 +313,7 @@
void
-send(java.lang.String message)
+send(String message)
Send String data to the Socket.io server.
@@ -281,10 +322,10 @@
-Methods inherited from class java.lang.Object
+Methods inherited from class java.lang.Object
-clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
@@ -315,8 +356,8 @@
SocketIO
-public SocketIO(java.lang.String url)
- throws java.net.MalformedURLException
+public SocketIO(String url)
+ throws MalformedURLException
- Instantiates a new socket.io connection. The object connects after
calling
connect(IOCallback)
@@ -324,16 +365,34 @@
- Parameters:
url - the url
- Throws:
-
java.net.MalformedURLException - the malformed url exception
+MalformedURLException - the malformed url exception
+
+
+
+
+SocketIO
+
+public SocketIO(String url,
+ Properties headers)
+ throws MalformedURLException
+
+- Instantiates a new socket.io connection and sets the request headers used
+ while connecting the first time for authorizing. The object connects
+ after calling
connect(IOCallback)
+
+
+- Parameters:
url - the urlheaders - the headers used while handshaking
+- Throws:
+
MalformedURLException - the malformed url exception
SocketIO
-public SocketIO(java.lang.String url,
+public SocketIO(String url,
IOCallback callback)
- throws java.net.MalformedURLException
+ throws MalformedURLException
- Instantiates a new socket.io object and connects to the given url. Do not
call any of the connect() methods afterwards.
@@ -341,14 +400,14 @@
- Parameters:
url - the urlcallback - the callback
- Throws:
-
java.net.MalformedURLException - the malformed url exception
+MalformedURLException - the malformed url exception
SocketIO
-public SocketIO(java.net.URL url,
+public SocketIO(URL url,
IOCallback callback)
- Instantiates a new socket.io object and connects to the given url. Do not
@@ -362,7 +421,7 @@
SocketIO
-public SocketIO(java.net.URL url)
+public SocketIO(URL url)
- Instantiates a new socket.io connection. The object connects after
calling
connect(IOCallback)
@@ -384,9 +443,9 @@
connect
-public void connect(java.lang.String url,
+public void connect(String url,
IOCallback callback)
- throws java.net.MalformedURLException
+ throws MalformedURLException
- connects to supplied host using callback. Do only use this method if you
instantiate
SocketIO using SocketIO().
@@ -394,7 +453,7 @@
- Parameters:
url - the urlcallback - the callback
- Throws:
-
java.net.MalformedURLException
+MalformedURLException
@@ -402,7 +461,7 @@
connect
-public void connect(java.net.URL url,
+public void connect(URL url,
IOCallback callback)
- connects to supplied host using callback. Do only use this method if you
@@ -432,15 +491,15 @@
emit
-public void emit(java.lang.String event,
- java.lang.Object... args)
+public void emit(String event,
+ Object... args)
- Emits an event to the Socket.IO server. If the connection is not
established, the call will be buffered and sent as soon as it is
possible.
-- Parameters:
event - the event nameargs - the arguments
+ - Parameters:
event - the event nameargs - arguments. can be any argument JSONArray.put(Object) can take.
@@ -448,16 +507,16 @@
emit
-public void emit(java.lang.String event,
+public void emit(String event,
IOAcknowledge ack,
- java.lang.Object... args)
+ Object... args)
- Emits an event to the Socket.IO server. If the connection is not
established, the call will be buffered and sent as soon as it is
possible.
-- Parameters:
event - the event nameack - an acknowledge implementationargs - the arguments
+ - Parameters:
event - the event nameack - an acknowledge implementationargs - arguments. can be any argument JSONArray.put(Object) can take.
@@ -479,7 +538,7 @@
getNamespace
-public java.lang.String getNamespace()
+public String getNamespace()
- Gets the namespace. Internally used.
@@ -520,7 +579,7 @@
send
-public void send(java.lang.String message)
+public void send(String message)
- Send String data to the Socket.io server.
@@ -534,7 +593,7 @@
send
public void send(IOAcknowledge ack,
- java.lang.String message)
+ String message)
- Send JSON data to the Socket.io server.
@@ -586,6 +645,66 @@
not connected or currently connecting
+
+
+
+getTransport
+
+public String getTransport()
+
+- Returns the name of the used transport
+
+
+
+- Returns:
- the name of the currently used transport
+
+
+
+
+
+getHeaders
+
+public Properties getHeaders()
+
+- Returns the headers used while handshaking. These Properties are not
+ necessarily the ones set by
addHeader(String, String) or
+ SocketIO(String, Properties) but the ones used for the
+ handshake.
+
+
+
+- Returns:
- the headers used while handshaking
+
+
+
+
+
+addHeader
+
+public SocketIO addHeader(String key,
+ String value)
+
+- Adds an header to the
headers
+
+
+
+- Returns:
- SocketIO.this for daisy chaining.
+
+
+
+
+
+getHeader
+
+public String getHeader(String key)
+
+- Returns the header value
+
+
+
+- Returns:
- the header value or
null if not present
+
+
@@ -616,7 +735,7 @@
- PREV CLASS
+ PREV CLASS
NEXT CLASS
FRAMES
diff --git a/doc/io/socket/SocketIOException.html b/doc/io/socket/SocketIOException.html
index 1981b5d..0967a4f 100644
--- a/doc/io/socket/SocketIOException.html
+++ b/doc/io/socket/SocketIOException.html
@@ -2,12 +2,12 @@
-
+
SocketIOException
-
+
@@ -55,7 +55,7 @@
PREV CLASS
- NEXT CLASS
+ NEXT CLASS
FRAMES
NO FRAMES
@@ -91,17 +91,17 @@
Class SocketIOException
-java.lang.Object
-
java.lang.Throwable
-
java.lang.Exception
+java.lang.Object
+
java.lang.Throwable
+
java.lang.Exception
io.socket.SocketIOException
-- All Implemented Interfaces:
- java.io.Serializable
+- All Implemented Interfaces:
- Serializable
-public class SocketIOException
- extends java.lang.Exception
+public class SocketIOException
- extends Exception
@@ -124,14 +124,14 @@
Constructor Summary
-SocketIOException(java.lang.String message)
+SocketIOException(String message)
Instantiates a new SocketIOException.
-SocketIOException(java.lang.String message,
- java.lang.Exception ex)
+SocketIOException(String message,
+ Exception ex)
Instantiates a new SocketIOException.
@@ -150,19 +150,19 @@
-Methods inherited from class java.lang.Throwable
+Methods inherited from class java.lang.Throwable
-fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
+fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-Methods inherited from class java.lang.Object
+Methods inherited from class java.lang.Object
-clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
+clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
@@ -181,7 +181,7 @@
SocketIOException
-public SocketIOException(java.lang.String message)
+public SocketIOException(String message)
- Instantiates a new SocketIOException.
@@ -193,8 +193,8 @@
SocketIOException
-public SocketIOException(java.lang.String message,
- java.lang.Exception ex)
+public SocketIOException(String message,
+ Exception ex)
- Instantiates a new SocketIOException.
@@ -232,7 +232,7 @@
PREV CLASS
- NEXT CLASS
+ NEXT CLASS
FRAMES
NO FRAMES
diff --git a/doc/io/socket/class-use/AllTests.html b/doc/io/socket/class-use/AllTests.html
new file mode 100644
index 0000000..8c15c7a
--- /dev/null
+++ b/doc/io/socket/class-use/AllTests.html
@@ -0,0 +1,142 @@
+
+
+
+
+
+
+Uses of Class io.socket.AllTests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+
+
+
+
+ PREV
+ NEXT
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+
+
+
+
+
+
+
+Uses of Class
io.socket.AllTests
+
+No usage of io.socket.AllTests
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+
+
+
+
+ PREV
+ NEXT
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/doc/io/socket/class-use/IOAcknowledge.html b/doc/io/socket/class-use/IOAcknowledge.html
index 019ee0e..447d65d 100644
--- a/doc/io/socket/class-use/IOAcknowledge.html
+++ b/doc/io/socket/class-use/IOAcknowledge.html
@@ -2,12 +2,12 @@
-
+
Uses of Interface io.socket.IOAcknowledge
-
+
@@ -40,7 +40,7 @@
Package
Class
Use
- Tree
+ Tree
Deprecated
Index
Help
@@ -92,22 +92,6 @@
-
-
-Fields in io.socket with type parameters of type IOAcknowledge
-
-
-
-(package private) java.util.HashMap<java.lang.Integer,IOAcknowledge>
-IOConnection.acknowledge
-
-
- Acknowledges.
-
-
-
-
-
Methods in io.socket with parameters of type IOAcknowledge
@@ -115,20 +99,9 @@
void
-IOConnection.emit(SocketIO socket,
- java.lang.String event,
- IOAcknowledge ack,
- java.lang.Object... args)
-
-
- emits an event from SocketIO to the IOTransport.
-
-
-
- void
-SocketIO.emit(java.lang.String event,
+SocketIO.emit(String event,
IOAcknowledge ack,
- java.lang.Object... args)
+ Object... args)
Emits an event to the Socket.IO server.
@@ -136,9 +109,9 @@
void
-IOCallback.on(java.lang.String event,
+IOCallback.on(String event,
IOAcknowledge ack,
- java.lang.Object... args)
+ Object... args)
On [Event].
@@ -155,7 +128,7 @@
void
-IOCallback.onMessage(java.lang.String data,
+IOCallback.onMessage(String data,
IOAcknowledge ack)
@@ -174,31 +147,11 @@
void
SocketIO.send(IOAcknowledge ack,
- java.lang.String message)
+ String message)
Send JSON data to the Socket.io server.
-
-
- void
-IOConnection.send(SocketIO socket,
- IOAcknowledge ack,
- org.json.JSONObject json)
-
-
- sends a JSON message from SocketIO to the IOTransport.
-
-
-
- void
-IOConnection.send(SocketIO socket,
- IOAcknowledge ack,
- java.lang.String text)
-
-
- sends a String message from SocketIO to the IOTransport.
-
@@ -217,7 +170,7 @@
Package
Class
Use
- Tree
+ Tree
Deprecated
Index
Help
diff --git a/doc/io/socket/class-use/IOCallback.html b/doc/io/socket/class-use/IOCallback.html
index 016015d..0a601db 100644
--- a/doc/io/socket/class-use/IOCallback.html
+++ b/doc/io/socket/class-use/IOCallback.html
@@ -2,12 +2,12 @@
-
+
Uses of Interface io.socket.IOCallback
-
+
@@ -40,7 +40,7 @@
Package
Class
Use
- Tree
+ Tree
Deprecated
Index
Help
@@ -92,22 +92,6 @@
-
-
-Fields in io.socket declared as IOCallback
-
-
-
-static IOCallback
-IOConnection.DUMMY_CALLBACK
-
-
- A dummy callback used when IOConnection receives a unexpected message.
-
-
-
-
-
Methods in io.socket that return IOCallback
@@ -139,7 +123,7 @@
void
-SocketIO.connect(java.lang.String url,
+SocketIO.connect(String url,
IOCallback callback)
@@ -148,7 +132,7 @@
void
-SocketIO.connect(java.net.URL url,
+SocketIO.connect(URL url,
IOCallback callback)
@@ -163,14 +147,14 @@
Constructors in io.socket with parameters of type IOCallback
-SocketIO(java.lang.String url,
+SocketIO(String url,
IOCallback callback)
Instantiates a new socket.io object and connects to the given url.
-SocketIO(java.net.URL url,
+SocketIO(URL url,
IOCallback callback)
@@ -194,7 +178,7 @@
Package
Class
Use
- Tree
+ Tree
Deprecated
Index
Help
diff --git a/doc/io/socket/class-use/SocketIO.html b/doc/io/socket/class-use/SocketIO.html
index 9ee5cc2..3090094 100644
--- a/doc/io/socket/class-use/SocketIO.html
+++ b/doc/io/socket/class-use/SocketIO.html
@@ -2,12 +2,12 @@
-
+
Uses of Class io.socket.SocketIO
-
+
@@ -40,7 +40,7 @@
Package
Class
Use
- Tree
+ Tree
Deprecated
Index
Help
@@ -94,63 +94,16 @@
-Methods in io.socket with parameters of type SocketIO
+Methods in io.socket that return SocketIO
- void
-IOConnection.emit(SocketIO socket,
- java.lang.String event,
- IOAcknowledge ack,
- java.lang.Object... args)
+ SocketIO
+SocketIO.addHeader(String key,
+ String value)
- emits an event from SocketIO to the IOTransport.
-
-
-
- void
-IOConnection.register(SocketIO socket)
-
-
- Connects a socket to the IOConnection.
-
-
-
-static IOConnection
-IOConnection.register(java.lang.String origin,
- SocketIO socket)
-
-
- Creates a new connection or returns the corresponding one.
-
-
-
- void
-IOConnection.send(SocketIO socket,
- IOAcknowledge ack,
- org.json.JSONObject json)
-
-
- sends a JSON message from SocketIO to the IOTransport.
-
-
-
- void
-IOConnection.send(SocketIO socket,
- IOAcknowledge ack,
- java.lang.String text)
-
-
- sends a String message from SocketIO to the IOTransport.
-
-
-
- void
-IOConnection.unregister(SocketIO socket)
-
-
- Disconnect a socket from the IOConnection.
+ Adds an header to the headers
@@ -170,7 +123,7 @@
Package
Class
Use
- Tree
+ Tree
Deprecated
Index
Help
diff --git a/doc/io/socket/class-use/SocketIOException.html b/doc/io/socket/class-use/SocketIOException.html
index 85f98ed..3d44e62 100644
--- a/doc/io/socket/class-use/SocketIOException.html
+++ b/doc/io/socket/class-use/SocketIOException.html
@@ -2,12 +2,12 @@
-
+
Uses of Class io.socket.SocketIOException
-
+
@@ -40,7 +40,7 @@
Package
Class
Use
- Tree
+ Tree
Deprecated
Index
Help
@@ -98,14 +98,6 @@
-protected void
-IOConnection.error(SocketIOException e)
-
-
- Populates an error to the connected IOCallbacks and shuts down.
-
-
-
void
IOCallback.onError(SocketIOException socketIOException)
@@ -130,7 +122,7 @@
Package
Class
Use
- Tree
+ Tree
Deprecated
Index
Help
diff --git a/doc/io/socket/package-frame.html b/doc/io/socket/package-frame.html
index 6d7e033..f17426c 100644
--- a/doc/io/socket/package-frame.html
+++ b/doc/io/socket/package-frame.html
@@ -2,12 +2,12 @@
-
+
io.socket
-
+
@@ -25,9 +25,7 @@
IOAcknowledge
-IOCallback
-
-IOTransport
+IOCallback
@@ -38,15 +36,7 @@
Classes
-IOConnection
-
-IOMessage
-
-SocketIO
-
-WebsocketTransport
-
-XhrTransport
+SocketIO
diff --git a/doc/io/socket/package-summary.html b/doc/io/socket/package-summary.html
index 2f831cb..1fe2edf 100644
--- a/doc/io/socket/package-summary.html
+++ b/doc/io/socket/package-summary.html
@@ -2,12 +2,12 @@
-
+
io.socket
-
+
@@ -95,10 +95,6 @@
IOCallback
The Interface IOCallback.
-
-IOTransport
-The Interface IOTransport.
-
@@ -110,25 +106,9 @@
Class Summary
-IOConnection
-The Class IOConnection.
-
-
-IOMessage
-The Class IOMessage.
-
-
SocketIO
The Class SocketIO.
-
-WebsocketTransport
-The Class WebsocketTransport.
-
-
-XhrTransport
-The Class XhrTransport.
-
diff --git a/doc/io/socket/package-tree.html b/doc/io/socket/package-tree.html
index 064a81f..9e37667 100644
--- a/doc/io/socket/package-tree.html
+++ b/doc/io/socket/package-tree.html
@@ -2,12 +2,12 @@
-
+
io.socket Class Hierarchy
-
+
@@ -87,26 +87,19 @@
Class Hierarchy
-- java.lang.Object
-- io.socket.IOConnection
- io.socket.IOMessage
- io.socket.SocketIO
- java.lang.Throwable (implements java.io.Serializable)
+
- java.lang.Object
+- io.socket.SocketIO
- java.lang.Throwable (implements java.io.Serializable)
-- java.lang.Exception
+- java.lang.Exception
- io.socket.SocketIOException
- - net.tootallnate.websocket.WebSocketAdapter
-- net.tootallnate.websocket.WebSocketClient (implements java.lang.Runnable)
-
-- io.socket.WebsocketTransport (implements io.socket.IOTransport)
-
-
- - io.socket.XhrTransport (implements io.socket.IOTransport)
Interface Hierarchy
-- io.socket.IOAcknowledge
- io.socket.IOCallback
- io.socket.IOTransport
+ - io.socket.IOAcknowledge
- io.socket.IOCallback
diff --git a/doc/io/socket/package-use.html b/doc/io/socket/package-use.html
index 08c9b13..100fbc0 100644
--- a/doc/io/socket/package-use.html
+++ b/doc/io/socket/package-use.html
@@ -2,12 +2,12 @@
-
+
Uses of Package io.socket
-
+
@@ -101,18 +101,6 @@
The Interface IOCallback.
-IOConnection
-
-
- The Class IOConnection.
-
-
-IOTransport
-
-
- The Interface IOTransport.
-
-
SocketIO
diff --git a/doc/overview-tree.html b/doc/overview-tree.html
index 3d90842..ea4c9cb 100644
--- a/doc/overview-tree.html
+++ b/doc/overview-tree.html
@@ -2,12 +2,12 @@
-
+
Class Hierarchy
-
+
@@ -89,26 +89,19 @@
Class Hierarchy
-- java.lang.Object
-- io.socket.IOConnection
- io.socket.IOMessage
- io.socket.SocketIO
- java.lang.Throwable (implements java.io.Serializable)
+
- java.lang.Object
+- io.socket.SocketIO
- java.lang.Throwable (implements java.io.Serializable)
-- java.lang.Exception
+- java.lang.Exception
- io.socket.SocketIOException
- - net.tootallnate.websocket.WebSocketAdapter
-- net.tootallnate.websocket.WebSocketClient (implements java.lang.Runnable)
-
-- io.socket.WebsocketTransport (implements io.socket.IOTransport)
-
-
- - io.socket.XhrTransport (implements io.socket.IOTransport)
Interface Hierarchy
-- io.socket.IOAcknowledge
- io.socket.IOCallback
- io.socket.IOTransport
+ - io.socket.IOAcknowledge
- io.socket.IOCallback
diff --git a/doc/serialized-form.html b/doc/serialized-form.html
index 83cd196..523d0bd 100644
--- a/doc/serialized-form.html
+++ b/doc/serialized-form.html
@@ -2,12 +2,12 @@
-
+
Serialized Form
-
+
@@ -40,7 +40,7 @@
Package
Class
Use
- Tree
+ Tree
Deprecated
Index
Help
@@ -96,7 +96,7 @@
-Class io.socket.SocketIOException extends java.lang.Exception implements Serializable
+Class io.socket.SocketIOException extends Exception implements Serializable
@@ -121,7 +121,7 @@
Package
Class
Use
- Tree
+ Tree
Deprecated
Index
Help
diff --git a/src/io/socket/IOConnection.java b/src/io/socket/IOConnection.java
index 0763916..70231a1 100644
--- a/src/io/socket/IOConnection.java
+++ b/src/io/socket/IOConnection.java
@@ -17,9 +17,9 @@
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
+import java.util.Map.Entry;
import java.util.Properties;
import java.util.Scanner;
-import java.util.Set;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.ConcurrentLinkedQueue;
@@ -90,6 +90,9 @@ class IOConnection {
/** The sockets of this connection. */
private HashMap sockets = new HashMap();
+ /** Custom Request headers used while handshaking */
+ private Properties headers;
+
/**
* The first socket to be connected. the socket.io server does not send a
* connected response to this one.
@@ -171,30 +174,12 @@ public void run() {
* {@link IOTransport}
*/
private class ConnectThread extends Thread {
-
- /** Custom Request headers used while handshaking */
- private Properties headers = new Properties();
-
-
/**
- * Instantiates a new background thread.
+ * Instantiates a new thread for handshaking/connecting.
*/
public ConnectThread() {
super("ConnectThread");
}
-
- /**
- * Instantiates a new background thread passing the header
- * will be used while handshaking.
- *
- * @param headers
- * the headers will be used while handshaking
- */
- public ConnectThread(Properties headers) {
- this();
- if ( headers != null )
- this.headers = headers;
- }
/**
* Tries handshaking if necessary and connects with corresponding
@@ -221,14 +206,11 @@ private void handshake() {
connection = url.openConnection();
connection.setConnectTimeout(connectTimeout);
connection.setReadTimeout(connectTimeout);
-
+
/* Setting the request headers */
- if ( ! this.headers.isEmpty() ){
- Set