sys_socket_shutdown

Function sys_socket_shutdown 

Source
pub fn sys_socket_shutdown(tf: &mut Trapframe) -> usize
Expand description

System call: Shutdown socket

Shuts down part or all of a socket connection.

§Arguments (via trapframe)

  • a0: Socket handle ID
  • a1: How to shutdown (0 = read, 1 = write, 2 = both)

§Returns

0 on success, usize::MAX (-1) on error

§Errors

Returns usize::MAX (-1) if:

  • Invalid handle ID
  • Invalid shutdown mode
  • Socket not connected