tesseract v5.3.3.20231005
|
#include <svutil.h>
Public Member Functions | |
SVNetwork (const char *hostname, int port) | |
Set up a connection to hostname on port. More... | |
~SVNetwork () | |
Destructor. More... | |
void | Send (const char *msg) |
Put a message in the messagebuffer to the server and try to send it. More... | |
char * | Receive () |
void | Close () |
Close the connection to the server. More... | |
void | Flush () |
Flush the buffer. More... | |
The SVNetwork class takes care of the remote connection for ScrollView This means setting up and maintaining a remote connection, sending and receiving messages and closing the connection. It is designed to work on both Linux and Windows.
tesseract::SVNetwork::SVNetwork | ( | const char * | hostname, |
int | port | ||
) |
Set up a connection to hostname on port.
Definition at line 275 of file svutil.cpp.
tesseract::SVNetwork::~SVNetwork | ( | ) |
Destructor.
Definition at line 354 of file svutil.cpp.
void tesseract::SVNetwork::Close | ( | ) |
Close the connection to the server.
Definition at line 225 of file svutil.cpp.
void tesseract::SVNetwork::Flush | ( | ) |
Flush the buffer.
Definition at line 170 of file svutil.cpp.
char * tesseract::SVNetwork::Receive | ( | ) |
Receive a message from the server. This will always return one line of char* (denoted by \n).
Definition at line 180 of file svutil.cpp.
void tesseract::SVNetwork::Send | ( | const char * | msg | ) |
Put a message in the messagebuffer to the server and try to send it.
Definition at line 164 of file svutil.cpp.