Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/altugbakan/rs-tftpd
/ functions
Functions
174 in github.com/altugbakan/rs-tftpd
⨍
Functions
174
◇
Types & classes
22
↓ 55 callers
Method
as_str
Converts an [`OptionType`] to a [`str`].
src/options.rs:292
↓ 51 callers
Method
as_bytes
Converts a [`u16`] to a [`u8`] array with 2 elements.
src/packet.rs:144
↓ 28 callers
Method
to_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 callers
Method
wait
(&mut self)
tests/integration_test.rs:35
↓ 15 callers
Method
len
Returns the length of the `Window`.
src/window.rs:85
↓ 13 callers
Function
initialize
(filename: &str)
tests/integration_test.rs:641
↓ 11 callers
Method
is_empty
Returns `true` if the `Window` is empty.
src/window.rs:90
↓ 9 callers
Function
check_files
(filename: &str)
tests/integration_test.rs:667
↓ 8 callers
Function
convert_file_path
(filename: &str)
src/server.rs:314
↓ 8 callers
Method
send
Sends a file to the remote [`SocketAddr`] that has sent a read request using a random port, asynchronously.
src/worker.rs:77
↓ 7 callers
Function
create_file
(filename: &str, size: usize)
tests/integration_test.rs:653
↓ 7 callers
Method
set_nonblocking
(&mut self, nonblocking: bool)
src/socket.rs:101
↓ 7 callers
Method
set_read_timeout
(&mut self, dur: Duration)
src/socket.rs:89
↓ 6 callers
Method
recv
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 callers
Function
convert_file_path_abs
(filename: &str)
src/client_config.rs:231
↓ 5 callers
Function
parse_rq
(buf: &[u8], opcode: Opcode)
src/packet.rs:224
↓ 4 callers
Method
add
Adds a data `Vec<u8>` to the `Window`.
src/window.rs:138
↓ 4 callers
Method
fill
Fills the `Window` with chunks of data from the file. Returns `true` if the `Window` is full.
src/window.rs:46
↓ 4 callers
Function
open
(filename: &str)
src/window.rs:261
↓ 4 callers
Method
parse
( options: &mut [TransferOption], request_type: RequestType, )
src/options.rs:112
↓ 3 callers
Function
create_folders
()
tests/integration_test.rs:646
↓ 3 callers
Function
parse_duration
(args: &mut T)
src/client_config.rs:68
↓ 3 callers
Function
parse_error
(buf: &[u8])
src/packet.rs:293
↓ 3 callers
Method
remove
Removes the first `amount` of elements from the `Window`.
src/window.rs:69
↓ 3 callers
Method
send_packet
(&self, packet: &Packet)
src/worker.rs:415
↓ 3 callers
Method
send_rollover_error
(&self)
src/worker.rs:292
↓ 3 callers
Method
serialize
Serializes a [`Packet`] into a [`Vec<u8>`].
src/packet.rs:79
↓ 3 callers
Method
set_write_timeout
(&mut self, dur: Duration)
src/socket.rs:95
↓ 2 callers
Function
accept_request
( socket: &T, options: &[TransferOption], request_type: RequestType, )
src/server.rs:352
↓ 2 callers
Method
apply
(&mut self, options: &Vec<TransferOption>)
src/options.rs:182
↓ 2 callers
Method
check_abort
(&self)
src/worker.rs:460
↓ 2 callers
Function
check_file_exists
(file: &Path, directory: &PathBuf)
src/server.rs:366
↓ 2 callers
Function
check_seq_num
(num: u16)
src/drop.rs:22
↓ 2 callers
Function
clean
(filename: &str)
src/window.rs:272
↓ 2 callers
Method
configure_worker
(&self, socket: UdpSocket)
src/client.rs:210
↓ 2 callers
Function
create_multi_socket
( addr: &SocketAddr, remote: &SocketAddr, )
src/server.rs:342
↓ 2 callers
Function
create_single_socket
( socket: &UdpSocket, remote: &SocketAddr, timeout: Duration, )
src/server.rs:332
↓ 2 callers
Function
drop_set
(opt: Option<String>)
src/drop.rs:9
↓ 2 callers
Method
empty
Empties the `Window` by writing the data to the file.
src/window.rs:127
↓ 2 callers
Method
get_abort_flag
Retrieve a ref to the abort flag
src/server.rs:303
↓ 2 callers
Function
initialize
(filename: &str)
src/window.rs:244
↓ 2 callers
Function
parse_ack
(buf: &[u8])
src/packet.rs:269
↓ 2 callers
Function
parse_data
(buf: &[u8])
src/packet.rs:262
↓ 2 callers
Function
parse_local_args
( arg: &str, args: &mut T, opt_local: &mut OptionsPrivate, )
src/config.rs:64
↓ 2 callers
Function
parse_oack
(buf: &[u8])
src/packet.rs:273
↓ 2 callers
Method
prepare
(&self)
src/options.rs:74
↓ 2 callers
Function
print_opt_local_help
()
src/config.rs:109
↓ 2 callers
Method
receive
Receives a file from the remote [`SocketAddr`] (client or server) using the supplied socket, asynchronously.
src/worker.rs:111
↓ 2 callers
Method
recv_from_with_size
(&self, size: usize)
src/socket.rs:77
↓ 2 callers
Method
recv_with_size
(&self, size: usize)
src/socket.rs:69
↓ 2 callers
Method
remote_addr
(&self)
src/socket.rs:85
↓ 2 callers
Method
send
(&self, packet: &Packet)
src/socket.rs:57
↓ 2 callers
Method
sender
Returns a [`Sender`] for sending [`Packet`]s to the remote [`Socket`].
src/socket.rs:208
↓ 2 callers
Method
set_paths
(&mut self, arg: &str)
src/client_config.rs:219
↓ 2 callers
Function
verbosity_set
Verbosity should be set once at program start.
src/log.rs:9
↓ 1 callers
Method
check_response
(&self)
src/worker.rs:444
↓ 1 callers
Function
client
(args: T)
src/client_main.rs:15
↓ 1 callers
Method
download
(&mut self, socket: UdpSocket)
src/client.rs:148
↓ 1 callers
Function
drop_check
(packet: &Packet)
src/drop.rs:32
↓ 1 callers
Method
file_len
Returns the length of the file
src/window.rs:164
↓ 1 callers
Method
get_elements
Returns a reference to the `VecDeque` containing the elements.
src/window.rs:80
↓ 1 callers
Method
handle_rrq
( &mut self, filename: String, options: &mut [TransferOption], to: &SocketAddr
src/server.rs:147
↓ 1 callers
Method
handle_wrq
( &mut self, filename: String, options: &mut [TransferOption], to: &SocketAddr
src/server.rs:222
↓ 1 callers
Method
is_full
Returns `true` if the `Window` is full.
src/window.rs:159
↓ 1 callers
Method
kill
(&mut self)
tests/integration_test.rs:39
↓ 1 callers
Method
listen
Starts listening for connections. Note that this function does not finish running until termination.
src/server.rs:68
↓ 1 callers
Method
prefill
Fill the read buffer to speed up next window fill
src/window.rs:63
↓ 1 callers
Function
print_version_exit
()
src/config.rs:118
↓ 1 callers
Function
print_version_exit
()
src/client_config.rs:83
↓ 1 callers
Method
receive_file
(mut self, file: File)
src/worker.rs:303
↓ 1 callers
Method
recv_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 callers
Method
route_packet
(&self, packet: Packet, to: &SocketAddr)
src/server.rs:293
↓ 1 callers
Method
run
Run the Client depending on the [`Mode`] the client is in
src/client.rs:67
↓ 1 callers
Method
send_file
(mut self, file: File, check_response: bool)
src/worker.rs:155
↓ 1 callers
Method
send_to
(&self, packet: &Packet, to: &SocketAddr)
src/socket.rs:63
↓ 1 callers
Function
serialize_ack
(block_num: &u16)
src/packet.rs:346
↓ 1 callers
Function
serialize_data
(block_num: &u16, data: &Vec<u8>)
src/packet.rs:337
↓ 1 callers
Function
serialize_error
(code: &ErrorCode, msg: &String)
src/packet.rs:350
↓ 1 callers
Function
serialize_oack
(options: &Vec<TransferOption>)
src/packet.rs:360
↓ 1 callers
Function
serialize_rrq
(filename: &String, mode: &String, options: &Vec<TransferOption>)
src/packet.rs:305
↓ 1 callers
Function
serialize_wrq
(filename: &String, mode: &String, options: &Vec<TransferOption>)
src/packet.rs:321
↓ 1 callers
Function
server
(args: T)
src/main.rs:8
↓ 1 callers
Method
upload
(&mut self, socket: UdpSocket)
src/client.rs:82
↓ 1 callers
Function
validate_file_path
(file: &Path, directory: &PathBuf)
src/server.rs:378
Function
adds_to_and_empties_window
()
src/window.rs:209
Method
as_bytes
Converts a [`TransferOption`] to a [`Vec<u8>`].
src/options.rs:235
Function
converts_file_path
()
src/server.rs:387
Function
converts_file_path_abs
()
src/client_config.rs:322
Function
converts_to_string
()
src/convert.rs:59
Function
converts_to_string_with_index
()
src/convert.rs:74
Function
converts_to_u16
()
src/convert.rs:46
Method
default
()
src/config.rs:49
Method
default
()
src/client_config.rs:53
Method
default
()
src/options.rs:44
Method
deserialize
Deserializes a [`u8`] slice into a [`Packet`].
src/packet.rs:63
Method
drop
(&mut self)
tests/integration_test.rs:45
Function
fills_and_removes_from_window
()
src/window.rs:180
Method
fmt
(&self, f: &mut fmt::Formatter<'_>)
src/packet.rs:209
Method
fmt
(&self, f: &mut fmt::Formatter)
src/options.rs:250
Method
from_str
Converts a [`str`] to an [`OptionType`].
src/options.rs:308
next →
1–100 of 174, ranked by callers