Struct seedlink::SeedLinkClient
[−]
[src]
pub struct SeedLinkClient { /* fields omitted */ }
SeedLink Client
Methods
impl SeedLinkClient
[src]
fn new(host: &str, port: i64) -> SeedLinkClient
[src]
Create a Client that connects to host:port. Connection will attempt to be established.
fn timeout(&mut self, millis: u64) -> Result<usize, SLError>
[src]
Set timeout in milliseconds during data reads from the server
fn read(&mut self, buf: &mut [u8]) -> Result<usize, SLError>
[src]
Read data from the server.
fn write<S: Into<String>>(&mut self, buf: S) -> Result<usize, SLError>
[src]
Write data to the server. This is typically not used directly
fn cmd(&mut self, cmd: &str) -> Result<usize, SLError>
[src]
Send raw command to the server
fn bye(&mut self) -> Result<usize, SLError>
[src]
Close the connection, say "BYE"
fn cat(&mut self) -> Result<usize, SLError>
[src]
Ask for list of stations, say "CAT"
fn hello(&mut self) -> Result<usize, SLError>
[src]
Initiate handshaking, say "HELLO"
fn end(&mut self) -> Result<usize, SLError>
[src]
Start data transfer (or end multi-station mode handshaking), say "END"
fn start(&mut self) -> Result<usize, SLError>
[src]
Start data transfer, see end(), say "END"
fn data_please(&mut self) -> Result<usize, SLError>
[src]
Start data transfer, see end(), say "END"
fn backfill(&mut self, when: DateTime<Utc>) -> Result<usize, SLError>
[src]
Request data from a timestamp until now, say "TIME when"
fn stream(&mut self, id: &StreamID) -> Result<usize, SLError>
[src]
Select station to retrieve, calls station() and select()
fn station(&mut self, sid: &StreamID) -> Result<usize, SLError>
[src]
Select station to retrieve, say "STATION station network"
fn select(&mut self, sid: &StreamID) -> Result<usize, SLError>
[src]
Select Location and Channel, say "SELECT {location}{channel}"
fn expect_ok(&mut self) -> Result<usize, SLError>
[src]
Read and expect an "OK" response from the server
fn time_range(
&mut self,
t0: DateTime<Utc>,
t1: DateTime<Utc>
) -> Result<usize, SLError>
[src]
&mut self,
t0: DateTime<Utc>,
t1: DateTime<Utc>
) -> Result<usize, SLError>
Request data within a time range from server, say "TIME time1 time2"
fn connect(&mut self, verbose: bool) -> Result<usize, SLError>
[src]
Handshaking, say "HELLO", read response, return number of bytes read
fn available_streams(&mut self) -> Result<Seedlink, SLError>
[src]
Determine available streams. Be carefule, for public servers this can take a bit of time to transfer the underlying data. Say "INFO STREAMS"