tesseract  v4.0.0-17-g361f3264
Open Source OCR Engine
SVNetwork Class Reference

#include <svutil.h>

Collaboration diagram for SVNetwork:

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...
 

Private Attributes

SVMutex mutex_send_
 The mutex for access to Send() and Flush(). More...
 
int stream_
 The actual stream_ to the server. More...
 
char * msg_buffer_in_
 Stores the last received message-chunk from the server. More...
 
std::string msg_buffer_out_
 Stores the messages which are supposed to go out. More...
 
bool has_content
 
char * buffer_ptr_
 Where we are at in our msg_buffer_in_. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ SVNetwork()

SVNetwork::SVNetwork ( const char *  hostname,
int  port 
)

Set up a connection to hostname on port.

◆ ~SVNetwork()

SVNetwork::~SVNetwork ( )

Destructor.

Member Function Documentation

◆ Close()

void SVNetwork::Close ( )

Close the connection to the server.

◆ Flush()

void SVNetwork::Flush ( )

Flush the buffer.

◆ Receive()

char * SVNetwork::Receive ( )

Receive a message from the server. This will always return one line of char* (denoted by
).

◆ Send()

void SVNetwork::Send ( const char *  msg)

Put a message in the messagebuffer to the server and try to send it.

Member Data Documentation

◆ buffer_ptr_

char* SVNetwork::buffer_ptr_
private

Where we are at in our msg_buffer_in_.

◆ has_content

bool SVNetwork::has_content
private

◆ msg_buffer_in_

char* SVNetwork::msg_buffer_in_
private

Stores the last received message-chunk from the server.

◆ msg_buffer_out_

std::string SVNetwork::msg_buffer_out_
private

Stores the messages which are supposed to go out.

◆ mutex_send_

SVMutex SVNetwork::mutex_send_
private

The mutex for access to Send() and Flush().

◆ stream_

int SVNetwork::stream_
private

The actual stream_ to the server.


The documentation for this class was generated from the following files: