Пример #1
0
 /*
  * Method Name: ChatClient
  * Arguments:
  *  host is the name or ip address of the computer that the server's on.
  *  inter is the user interface that is associated with this client.
  * Description:
  *  Constructor for ChatClient.  Initializes data members.
  */
 public ChatClient(String host, ClientInterface inter)
 {
     shouldEnd       = false;
     clientInterface = inter;
     streamWriter    = null;
     streamReader    = null;
     //If localhost, use it.  Otherwise, whatever is in host
     hostName = host == "localhost" ? "127.0.0.1" : host;
 }
Пример #2
0
        public static void Main(String[] args)
        {
            ClientInterface UI = new ClientInterface();

            System.Windows.Forms.Application.Run(UI);
        }