Ejemplo n.º 1
0
 //Disconnect socket from whatever it's plugged in to
 public void disconnect()
 {
     if (connectedSocket != null)
     {
         connectedSocket.connectedSocket = null;
     }
     connectedSocket = null;
 }
Ejemplo n.º 2
0
 //Connect a socket to another object
 public void connect(CoreSocketComponent socket)
 {
     if (connectedSocket == null)
     {
         //If nothing's plugged in connect
         connectedSocket = socket;
     }
     else
     {
         //If something else is plugged in, disconnect the previous socket and connect the new one
         connectedSocket.connectedSocket = null;
         connectedSocket = socket;
     }
 }
Ejemplo n.º 3
0
 //Initialisation of lists
 public CoreSocketComponent(CoreComponent adjoinedComponent)
 {
     this.adjoinedComponent = adjoinedComponent;
     connectedSocket        = null;
 }