io.socket
Interface IOTransport

All Known Implementing Classes:
WebsocketTransport, XhrTransport

interface IOTransport

The Interface IOTransport.


Method Summary
 boolean canSendBulk()
          return true if the IOTransport prefers to send multiple messages at a time.
 void connect()
          Instructs the IOTransport to connect.
 void disconnect()
          Instructs the IOTransport to disconnect.
 java.lang.String getName()
           
 void invalidate()
          Instructs the IOTransport to invalidate.
 void send(java.lang.String text)
          Instructs the IOTransport to send a Message
 void sendBulk(java.lang.String[] texts)
          Instructs the IOTransport to send multiple messages.
 

Method Detail

connect

void connect()
Instructs the IOTransport to connect.


disconnect

void disconnect()
Instructs the IOTransport to disconnect.


send

void send(java.lang.String text)
          throws java.lang.Exception
Instructs the IOTransport to send a Message

Parameters:
text - the text to be sent
Throws:
java.io.IOException - Signals that an I/O exception has occurred.
java.lang.Exception

canSendBulk

boolean canSendBulk()
return true if the IOTransport prefers to send multiple messages at a time.

Returns:
true, if successful

sendBulk

void sendBulk(java.lang.String[] texts)
              throws java.io.IOException
Instructs the IOTransport to send multiple messages. This is only called when canSendBulk returns true.

Parameters:
texts - the texts
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

invalidate

void invalidate()
Instructs the IOTransport to invalidate. DO NOT DISCONNECT from the server. just make sure, that events are not populated to the IOConnection


getName

java.lang.String getName()