///|
/// Stub for the wasm / wasm-gc targets: the socket transport is native-only,
/// so any use on these targets raises `Unsupported`. The SMTP protocol core
/// itself is fully portable and still available on these targets.
pub struct SocketTransport {
  connected : Bool
}

///|
pub fn SocketTransport::new() -> SocketTransport {
  { connected: false }
}

///|
pub impl SmtpTransport for SocketTransport with fn connect(_self, _config) {
  raise MailFailure::unsupported(
    "SocketTransport requires the native target (wasm target does not support raw sockets)",
  )
}

///|
pub impl SmtpTransport for SocketTransport with fn write_line(_self, _line) {
  raise MailFailure::unsupported(
    "SocketTransport is not available on the wasm target",
  )
}

///|
pub impl SmtpTransport for SocketTransport with fn read_line(_self) {
  raise MailFailure::unsupported(
    "SocketTransport is not available on the wasm target",
  )
}

///|
pub impl SmtpTransport for SocketTransport with fn close(_self) {
  ()
}