CommitDatabaseRemote¶
- class dsviper.CommitDatabaseRemote¶
Bases:
objectA low-level class used to represent a remote Commit database through the CommitDatabasing interface. Use the high-level static factory method CommitDatabase.connect(…) or CommitDatabase.connect_local(…).
Note: Not directly instantiable.
- close() None¶
Close the connection.
- commit_databasing() CommitDatabasing¶
Return the CommitDatabasing interface.
- static connect(host: str, service: str = '54321') CommitDatabaseRemote¶
Return a CommitDatabaseRemote served by host on service, over TCP.
- static connect_local(socket_path: str) CommitDatabaseRemote¶
Connect to the socket located at socket_path.
- download_speed(size: int = 1) float¶
Return the download speed in MBps (megabytes per second).
Measured by receiving size megabytes. size is brought into [1, 1000]: a smaller one counts as 1, a larger one as 1000.
- is_closed() bool¶
Return True if this connection to the server is closed.
- ping() float¶
Ping (latency is the technically more correct term) means the time it takes for a small data set to be transmitted from your device to a server and back to your device again. The ping time is measured in milliseconds (ms).
- upload_speed(size: int = 1) float¶
Return the upload speed in MBps (megabytes per second).
Measured by sending size megabytes. size is brought into [1, 1000]: a smaller one counts as 1, a larger one as 1000.