31 #ifndef PTLIB_INETPROT_H 32 #define PTLIB_INETPROT_H 70 char const *
const * cmdNames
270 unsigned numericCode,
387 #endif // PTLIB_INETPROT_H virtual PBoolean WriteCommand(PINDEX cmdNumber)
Write a single line for a command.
PString GetLastResponseInfo() const
Return the last response received by the socket.
This class defines an arbitrary time interval to millisecond accuracy.
Definition: timeint.h:55
virtual PBoolean ReadCommand(PINDEX &num, PString &args)
Read a single line of a command which ends with a CR/LF pair.
Array of characters.
Definition: array.h:551
#define PCLASSINFO(cls, par)
Declare all the standard PTLib class information.
Definition: object.h:1049
int lastResponseCode
Definition: inetprot.h:377
PCharArray unReadBuffer
Definition: inetprot.h:360
PINDEX unReadCount
Definition: inetprot.h:363
This class describes a type of socket that will communicate using the Internet Protocol.
Definition: ipsock.h:63
Definition: inetprot.h:370
Definition: inetprot.h:370
This is a channel that operates indirectly through another channel(s).
Definition: indchan.h:49
This is an array collection class of PString objects.
Definition: pstring.h:2024
virtual PBoolean WriteResponse(unsigned numericCode, const PString &info)
Write a response code followed by a text string describing the response to a command.
virtual int ExecuteCommand(PINDEX cmdNumber)
Write a command to the socket, using WriteCommand() and await a response using ReadResponse().
Definition: inetprot.h:370
PString defaultServiceName
Definition: inetprot.h:354
A TCP/IP socket for process/application layer high level protocols.
Definition: inetprot.h:62
BOOL PBoolean
Definition: object.h:102
PBoolean newLineToCRLF
Definition: inetprot.h:374
void SetReadLineTimeout(const PTimeInterval &t)
Set the maximum timeout between characters within a line.
enum PInternetProtocol::StuffState stuffingState
const PString & GetDefaultService() const
Get the default service name or port number to use in socket connections.
PStringArray commandNames
Definition: inetprot.h:357
int GetLastResponseCode() const
Return the code associated with the last response received by the socket.
PIPSocket * GetSocket() const
Get the eventual socket for the series of indirect channels that may be between the current protocol ...
Definition: inetprot.h:370
virtual PBoolean WriteLine(const PString &line)
Write a string to the socket channel followed by a CR/LF pair.
The character string class.
Definition: pstring.h:108
virtual PBoolean Connect(const PString &address, WORD port=0)
Connect a socket to a remote host for the internet protocol.
Definition: inetprot.h:370
PString lastResponseInfo
Definition: inetprot.h:378
virtual void UnRead(int ch)
Put back the characters into the data stream so that the next Read() function call will return them f...
Definition: inetprot.h:370
PInternetProtocol(const char *defaultServiceName, PINDEX cmdCount, char const *const *cmdNames)
StuffState
Definition: inetprot.h:369
virtual PBoolean Write(const void *buf, PINDEX len)
Low level write to the channel.
virtual PBoolean ReadResponse()
Read a response code followed by a text string describing the response to a command.
A network communications channel.
Definition: socket.h:58
virtual PBoolean Read(void *buf, PINDEX len)
Low level read from the channel.
PTimeInterval readLineTimeout
Definition: inetprot.h:366
virtual PBoolean ReadLine(PString &line, PBoolean allowContinuation=false)
Read a string from the socket channel up to a CR/LF pair.
virtual PINDEX ParseResponse(const PString &line)
Parse a response line string into a response code and any extra info on the line. ...
virtual PBoolean Accept(PSocket &listener)
Accept a server socket to a remote host for the internet protocol.