# Struct actix_web::ws::ClientWriter[−][src]

    pub struct ClientWriter { /* fields omitted */ }

Websocket writer client

## Methods

###

`impl ClientWriter`

[src]

####

`pub fn text<T: Into<Binary>>(&mut self, text: T)`

[src]

Send text frame

####

`pub fn binary<B: Into<Binary>>(&mut self, data: B)`

[src]

Send binary frame

####

`pub fn ping(&mut self, message: &str)`

[src]

Send ping frame

####

`pub fn pong(&mut self, message: &str)`

[src]

Send pong frame

####

`pub fn close(&mut self, reason: Option<CloseReason>)`

[src]

Send close frame

## Trait Implementations

###

`impl WsWriter for ClientWriter`

[src]

####

`fn send_text<T: Into<Binary>>(&mut self, text: T)`

[src]

Send text frame

####

`fn send_binary<B: Into<Binary>>(&mut self, data: B)`

[src]

Send binary frame

####

`fn send_ping(&mut self, message: &str)`

[src]

Send ping frame

####

`fn send_pong(&mut self, message: &str)`

[src]

Send pong frame

####

`fn send_close(&mut self, reason: Option<CloseReason>)`

[src]

Send close frame

## Auto Trait Implementations

###

`impl !Send for ClientWriter`

###

`impl !Sync for ClientWriter`

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)

Search multiple things at once by splitting your query with comma (e.g. `str,u8` or `String,struct:Vec,test`)