Package totalcross.io

Class Connector


  • public class Connector
    extends java.lang.Object
    Used to open socket connections over CRADLE, WIFI, MDS, GPRS.
    • Constructor Summary

      Constructors 
      Constructor Description
      Connector()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static totalcross.io.Connection open​(java.lang.String url)
      Opens a new socket to the given url.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Connector

        public Connector()
    • Method Detail

      • open

        public static totalcross.io.Connection open​(java.lang.String url)
                                             throws IOException,
                                                    InvalidNumberException
        Opens a new socket to the given url. The socket will be opened using the first available network connection in the following order: CRADLE, WIFI, MDS, GPRS.
        Parameters:
        url - The socket opened to the given url and network connection.
        Returns:
        The socket opened to the given url and network connection.
        Throws:
        IOException
        InvalidNumberException