Logo Search packages:      
Sourcecode: qtsmbstatus version File versions  Download package

void ClientSocket::connectionToServer ( const QString &  username,
const QString &  passwd 
)

Connect to server

Parameters:
username username (a valid login on server)
passwd password (a valid password on server)

Definition at line 92 of file clientsocket.cpp.

References ClientSSL::Connect(), core(), SignalShortMessage(), socketclosed(), socketconnected(), and UnreachableHost().

Referenced by main_windows::open_dialog_for_login().

{
      username_login=username;
      passwd_login=passwd;

      debugQt("ClientSocket::connectionToServer()");
      socketclient = new ClientSSL(this);
      // socketclient can post a message on statusBar
      connect (socketclient,SIGNAL(info(const QString & )),this,SIGNAL(SignalShortMessage(const QString & )) );
      // when server sends data, send it to core methods
      connect (socketclient,SIGNAL(readFromHost(const Q3CString& )),this,SLOT(core(const Q3CString& )) );
      // connect to slots, signals connected and closed
      connect (socketclient,SIGNAL(socketconnected()),this,SLOT(socketconnected()) );
      connect (socketclient,SIGNAL(socketclosed()),this,SLOT(socketclosed()) );
      // host unreachable
      connect (socketclient,SIGNAL(UnreachableHost()),this,SLOT(UnreachableHost()) );
      // connect on server
      socketclient->Connect(host,port_server);
}


Generated by  Doxygen 1.6.0   Back to index