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

BOOL PTelnetSocket::Connect ( const PString address ) [virtual]

Connect a socket to a remote host on the specified port number. This is typically used by the client or initiator of a communications channel. This connects to a "listening" socket at the other end of the communications channel.

The port number as defined by the object instance construction or the PIPSocket::SetPort() function.

Returns:
TRUE if the channel was successfully connected to the remote host.
Parameters:
addressAddress of remote machine to connect to.

Reimplemented from PIPSocket.

Definition at line 121 of file telnet.cxx.

References PIPSocket::Connect(), SendDo(), SendWill(), StatusOption, SuppressGoAhead, and TerminalSpeed.

Referenced by PTelnetSocket().

{
  PTelnetError << "Connect" << endl;

  if (!PTCPSocket::Connect(host))
    return FALSE;

  SendDo(SuppressGoAhead);
  SendDo(StatusOption);
  SendWill(TerminalSpeed);
  return TRUE;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index