Exemple #1
0
 public IPTransportAddress(TransportAddress.TAType t, IPAddress addr, int port):
   this(String.Format("brunet.{0}://{1}:{2}", TATypeToString(t), addr, port))
 {
   _type = t;
   _ips = new ArrayList(1);
   _ips.Add( addr );
 }
Exemple #2
0
 public IPTransportAddress(TransportAddress.TAType t, string host, int port) :
   this(String.Format("brunet.{0}://{1}:{2}", TATypeToString(t), host, port))
 {
   _type = t;
   _ips = null;
 }
Exemple #3
0
 /**
  * .Net methods are not always so fast here
  */
 public static string TATypeToString(TAType t) {
   switch(t) {
     case TAType.S:
       return _SIMULATION_S;
     case TAType.Udp:
       return _UDP_S;
     case TAType.Tunnel:
       return _TUNNEL_S;
     case TAType.Tcp:
       return _TCP_S;
     case TAType.Function:
       return _FUNCTION_S;
     default:
       return t.ToString().ToLower();
   }
 }
Exemple #4
0
 /**
  * .Net methods are not always so fast here
  */
 public static string TATypeToString(TAType t) {
   switch(t) {
     case TAType.S:
       return _SIMULATION_S;
     case TAType.SO:
       return _SIMULATION_OTHER_S;
     case TAType.Udp:
       return _UDP_S;
     case TAType.Relay:
       return _TUNNEL_S;
     case TAType.Tcp:
       return _TCP_S;
     case TAType.Function:
       return _FUNCTION_S;
     case TAType.Subring:
       return _SUBRING_S;
     default:
       return t.ToString().ToLower();
   }
 }
Exemple #5
0
 public IPTransportAddress(TransportAddress.TAType t,
                         System.Net.IPAddress addr, int port):
       this("brunet." + TATypeToString(t) + "://"
      + addr.ToString() + ":" + port.ToString())
 {
   _type = t;
   _ips = new ArrayList(1);
   _ips.Add( addr );
 }
Exemple #6
0
 public IPTransportAddress(TransportAddress.TAType t,
                         string host, int port):
   this("brunet." + TATypeToString(t) + "://" + host + ":" + port.ToString())
 {
   _type = t;
   _ips = null;
 }