Bridges-Java  3.4.4-dev2-4-g23cf54b
Bridges(Java API)
Public Member Functions | List of all members
bridges.connect.SocketConnection Class Reference

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...
 

Detailed Description

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

Constructor & Destructor Documentation

◆ SocketConnection()

bridges.connect.SocketConnection.SocketConnection ( Bridges  b)

Pass the BRIDGES object to this class

Parameters
bBridges object

Member Function Documentation

◆ addListener()

void bridges.connect.SocketConnection.addListener ( KeypressListener  toAdd)

Register listeners to keypress events

Parameters
toAddkeypress listener object

◆ close()

void bridges.connect.SocketConnection.close ( )

close the socket

◆ sendData()

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

◆ setupConnection()

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


The documentation for this class was generated from the following file: