![]() |
Bridges-Java 3.5.0
Bridges(Java API)
|
This is an internal class to BRIDGES that is not intended to be seen by the end user. More...
Public Member Functions | |
| SocketConnection (Bridges b) | |
| void | addListener (KeypressListener toAdd) |
| void | setupConnection () |
| void | sendData (String dataframe) |
| void | close () |
| close the socket More... | |
This is an internal class to BRIDGES that is not intended to be seen by the end user.
This class is a wrapper for a socket.io socket connection for BRIDGES
| bridges.connect.SocketConnection.SocketConnection | ( | Bridges | b | ) |
Pass the BRIDGES object to this class
| b | Bridges object |
| void bridges.connect.SocketConnection.addListener | ( | KeypressListener | toAdd | ) |
Register listeners to keypress events
| toAdd | keypress listener object |
| void bridges.connect.SocketConnection.close | ( | ) |
close the socket
| void bridges.connect.SocketConnection.sendData | ( | String | dataframe | ) |
Send a dataframe string to the socket server
TODO: this currently emits a gamegrid:recv event. We may need to refactor this to consider a variety of dataframe types
| void bridges.connect.SocketConnection.setupConnection | ( | ) |
Given username and assignment number, set up a connection to the socket server.
TODO: this will need to be refactored to sit within BRIDGES, but for now we pass credentials directly