Dart DocumentationptwebserverptHost

ptHost class

class ptHost {
 ptHost({List<String> pub_index_files}) {
   if(pub_index_files==null) {
     public_index_files = new List<String>();
   } else {
     public_index_files = pub_index_files;
   }
   hostname = "";
   public_path = "";
   Request = null;
   allow_dir_view;
 }
 // Name of the host, mostly for logging
 String name;
 
 // Address to listen on
 String address = "127.0.0.1";
 
 // Hostname to check against
 String hostname;
 
 // Port to check on
 int port = 80;
 
 // Path to the html publicly available files
 String public_path;
 
 // When a directory is hit, if there is no specific file to open, check against this
 List<String> public_index_files;
 
 // Allow directory structure
 bool allow_dir_view;
 
 Map toJson() {
   Map ret = new Map();
   ret['name']=name;
   ret['address']=address;
   ret['hostname']=hostname;
   ret['port']=port;
   ret['public_path']=public_path;
   ret['public_index_files'] = public_index_files;
   ret['allow_dir_view']=allow_dir_view;
   return ret;
 }
 RequestCallback Request;
}

Constructors

new ptHost({List<String> pub_index_files}) #

Creates a new Object instance.

Object instances have no meaningful state, and are only useful through their identity. An Object instance is equal to itself only.

docs inherited from Object
ptHost({List<String> pub_index_files}) {
 if(pub_index_files==null) {
   public_index_files = new List<String>();
 } else {
   public_index_files = pub_index_files;
 }
 hostname = "";
 public_path = "";
 Request = null;
 allow_dir_view;
}

Properties

String address #

String address = "127.0.0.1"

bool allow_dir_view #

bool allow_dir_view

String hostname #

String hostname

String name #

String name

int port #

int port = 80

List<String> public_index_files #

List<String> public_index_files

String public_path #

String public_path

RequestCallback Request #

RequestCallback Request

Methods

Map toJson() #

Map toJson() {
 Map ret = new Map();
 ret['name']=name;
 ret['address']=address;
 ret['hostname']=hostname;
 ret['port']=port;
 ret['public_path']=public_path;
 ret['public_index_files'] = public_index_files;
 ret['allow_dir_view']=allow_dir_view;
 return ret;
}