MCPcopy Index your code

hub / github.com/altugbakan/rs-tftpd / functions

Functions174 in github.com/altugbakan/rs-tftpd

↓ 55 callersMethodas_str
Converts an [`OptionType`] to a [`str`].
src/options.rs:292
↓ 51 callersMethodas_bytes
Converts a [`u16`] to a [`u8`] array with 2 elements.
src/packet.rs:144
↓ 28 callersMethodto_string
Converts a zero-terminated [`u8`] slice to a [`String`], and returns the size of the [`String`]. Useful for TFTP packet conversions.
src/convert.rs:30
↓ 20 callersMethodwait
(&mut self)
tests/integration_test.rs:35
↓ 15 callersMethodlen
Returns the length of the `Window`.
src/window.rs:85
↓ 13 callersFunctioninitialize
(filename: &str)
tests/integration_test.rs:641
↓ 11 callersMethodis_empty
Returns `true` if the `Window` is empty.
src/window.rs:90
↓ 9 callersFunctioncheck_files
(filename: &str)
tests/integration_test.rs:667
↓ 8 callersFunctionconvert_file_path
(filename: &str)
src/server.rs:314
↓ 8 callersMethodsend
Sends a file to the remote [`SocketAddr`] that has sent a read request using a random port, asynchronously.
src/worker.rs:77
↓ 7 callersFunctioncreate_file
(filename: &str, size: usize)
tests/integration_test.rs:653
↓ 7 callersMethodset_nonblocking
(&mut self, nonblocking: bool)
src/socket.rs:101
↓ 7 callersMethodset_read_timeout
(&mut self, dur: Duration)
src/socket.rs:89
↓ 6 callersMethodrecv
Receives a [`Packet`] from the socket's connected remote [`Socket`]. This function cannot handle large data packets due to the limited buffer size, so
src/socket.rs:26
↓ 5 callersFunctionconvert_file_path_abs
(filename: &str)
src/client_config.rs:231
↓ 5 callersFunctionparse_rq
(buf: &[u8], opcode: Opcode)
src/packet.rs:224
↓ 4 callersMethodadd
Adds a data `Vec<u8>` to the `Window`.
src/window.rs:138
↓ 4 callersMethodfill
Fills the `Window` with chunks of data from the file. Returns `true` if the `Window` is full.
src/window.rs:46
↓ 4 callersFunctionopen
(filename: &str)
src/window.rs:261
↓ 4 callersMethodparse
( options: &mut [TransferOption], request_type: RequestType, )
src/options.rs:112
↓ 3 callersFunctioncreate_folders
()
tests/integration_test.rs:646
↓ 3 callersFunctionparse_duration
(args: &mut T)
src/client_config.rs:68
↓ 3 callersFunctionparse_error
(buf: &[u8])
src/packet.rs:293
↓ 3 callersMethodremove
Removes the first `amount` of elements from the `Window`.
src/window.rs:69
↓ 3 callersMethodsend_packet
(&self, packet: &Packet)
src/worker.rs:415
↓ 3 callersMethodsend_rollover_error
(&self)
src/worker.rs:292
↓ 3 callersMethodserialize
Serializes a [`Packet`] into a [`Vec<u8>`].
src/packet.rs:79
↓ 3 callersMethodset_write_timeout
(&mut self, dur: Duration)
src/socket.rs:95
↓ 2 callersFunctionaccept_request
( socket: &T, options: &[TransferOption], request_type: RequestType, )
src/server.rs:352
↓ 2 callersMethodapply
(&mut self, options: &Vec<TransferOption>)
src/options.rs:182
↓ 2 callersMethodcheck_abort
(&self)
src/worker.rs:460
↓ 2 callersFunctioncheck_file_exists
(file: &Path, directory: &PathBuf)
src/server.rs:366
↓ 2 callersFunctioncheck_seq_num
(num: u16)
src/drop.rs:22
↓ 2 callersFunctionclean
(filename: &str)
src/window.rs:272
↓ 2 callersMethodconfigure_worker
(&self, socket: UdpSocket)
src/client.rs:210
↓ 2 callersFunctioncreate_multi_socket
( addr: &SocketAddr, remote: &SocketAddr, )
src/server.rs:342
↓ 2 callersFunctioncreate_single_socket
( socket: &UdpSocket, remote: &SocketAddr, timeout: Duration, )
src/server.rs:332
↓ 2 callersFunctiondrop_set
(opt: Option<String>)
src/drop.rs:9
↓ 2 callersMethodempty
Empties the `Window` by writing the data to the file.
src/window.rs:127
↓ 2 callersMethodget_abort_flag
Retrieve a ref to the abort flag
src/server.rs:303
↓ 2 callersFunctioninitialize
(filename: &str)
src/window.rs:244
↓ 2 callersFunctionparse_ack
(buf: &[u8])
src/packet.rs:269
↓ 2 callersFunctionparse_data
(buf: &[u8])
src/packet.rs:262
↓ 2 callersFunctionparse_local_args
( arg: &str, args: &mut T, opt_local: &mut OptionsPrivate, )
src/config.rs:64
↓ 2 callersFunctionparse_oack
(buf: &[u8])
src/packet.rs:273
↓ 2 callersMethodprepare
(&self)
src/options.rs:74
↓ 2 callersFunctionprint_opt_local_help
()
src/config.rs:109
↓ 2 callersMethodreceive
Receives a file from the remote [`SocketAddr`] (client or server) using the supplied socket, asynchronously.
src/worker.rs:111
↓ 2 callersMethodrecv_from_with_size
(&self, size: usize)
src/socket.rs:77
↓ 2 callersMethodrecv_with_size
(&self, size: usize)
src/socket.rs:69
↓ 2 callersMethodremote_addr
(&self)
src/socket.rs:85
↓ 2 callersMethodsend
(&self, packet: &Packet)
src/socket.rs:57
↓ 2 callersMethodsender
Returns a [`Sender`] for sending [`Packet`]s to the remote [`Socket`].
src/socket.rs:208
↓ 2 callersMethodset_paths
(&mut self, arg: &str)
src/client_config.rs:219
↓ 2 callersFunctionverbosity_set
Verbosity should be set once at program start.
src/log.rs:9
↓ 1 callersMethodcheck_response
(&self)
src/worker.rs:444
↓ 1 callersFunctionclient
(args: T)
src/client_main.rs:15
↓ 1 callersMethoddownload
(&mut self, socket: UdpSocket)
src/client.rs:148
↓ 1 callersFunctiondrop_check
(packet: &Packet)
src/drop.rs:32
↓ 1 callersMethodfile_len
Returns the length of the file
src/window.rs:164
↓ 1 callersMethodget_elements
Returns a reference to the `VecDeque` containing the elements.
src/window.rs:80
↓ 1 callersMethodhandle_rrq
( &mut self, filename: String, options: &mut [TransferOption], to: &SocketAddr
src/server.rs:147
↓ 1 callersMethodhandle_wrq
( &mut self, filename: String, options: &mut [TransferOption], to: &SocketAddr
src/server.rs:222
↓ 1 callersMethodis_full
Returns `true` if the `Window` is full.
src/window.rs:159
↓ 1 callersMethodkill
(&mut self)
tests/integration_test.rs:39
↓ 1 callersMethodlisten
Starts listening for connections. Note that this function does not finish running until termination.
src/server.rs:68
↓ 1 callersMethodprefill
Fill the read buffer to speed up next window fill
src/window.rs:63
↓ 1 callersFunctionprint_version_exit
()
src/config.rs:118
↓ 1 callersFunctionprint_version_exit
()
src/client_config.rs:83
↓ 1 callersMethodreceive_file
(mut self, file: File)
src/worker.rs:303
↓ 1 callersMethodrecv_from
Receives a [`Packet`] from any remote [`Socket`] and returns the [`SocketAddr`] of the remote [`Socket`]. This function cannot handle large data packe
src/socket.rs:37
↓ 1 callersMethodroute_packet
(&self, packet: Packet, to: &SocketAddr)
src/server.rs:293
↓ 1 callersMethodrun
Run the Client depending on the [`Mode`] the client is in
src/client.rs:67
↓ 1 callersMethodsend_file
(mut self, file: File, check_response: bool)
src/worker.rs:155
↓ 1 callersMethodsend_to
(&self, packet: &Packet, to: &SocketAddr)
src/socket.rs:63
↓ 1 callersFunctionserialize_ack
(block_num: &u16)
src/packet.rs:346
↓ 1 callersFunctionserialize_data
(block_num: &u16, data: &Vec<u8>)
src/packet.rs:337
↓ 1 callersFunctionserialize_error
(code: &ErrorCode, msg: &String)
src/packet.rs:350
↓ 1 callersFunctionserialize_oack
(options: &Vec<TransferOption>)
src/packet.rs:360
↓ 1 callersFunctionserialize_rrq
(filename: &String, mode: &String, options: &Vec<TransferOption>)
src/packet.rs:305
↓ 1 callersFunctionserialize_wrq
(filename: &String, mode: &String, options: &Vec<TransferOption>)
src/packet.rs:321
↓ 1 callersFunctionserver
(args: T)
src/main.rs:8
↓ 1 callersMethodupload
(&mut self, socket: UdpSocket)
src/client.rs:82
↓ 1 callersFunctionvalidate_file_path
(file: &Path, directory: &PathBuf)
src/server.rs:378
Functionadds_to_and_empties_window
()
src/window.rs:209
Methodas_bytes
Converts a [`TransferOption`] to a [`Vec<u8>`].
src/options.rs:235
Functionconverts_file_path
()
src/server.rs:387
Functionconverts_file_path_abs
()
src/client_config.rs:322
Functionconverts_to_string
()
src/convert.rs:59
Functionconverts_to_string_with_index
()
src/convert.rs:74
Functionconverts_to_u16
()
src/convert.rs:46
Methoddefault
()
src/config.rs:49
Methoddefault
()
src/client_config.rs:53
Methoddefault
()
src/options.rs:44
Methoddeserialize
Deserializes a [`u8`] slice into a [`Packet`].
src/packet.rs:63
Methoddrop
(&mut self)
tests/integration_test.rs:45
Functionfills_and_removes_from_window
()
src/window.rs:180
Methodfmt
(&self, f: &mut fmt::Formatter<'_>)
src/packet.rs:209
Methodfmt
(&self, f: &mut fmt::Formatter)
src/options.rs:250
Methodfrom_str
Converts a [`str`] to an [`OptionType`].
src/options.rs:308
next →1–100 of 174, ranked by callers