mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-06 20:58:28 +00:00
wasix: Remove websocket support
Removes the websocket support from wasix. Websockets are a high level concept. They should not be integrated so deeply into the core of wasix. For client connections, we will want to add support for websocket clients into the custom wasix_http_client bindings. For servers, the support should go into the custom wcgi server bindings.
This commit is contained in:
@@ -33,13 +33,6 @@ pub struct IpRoute {
|
||||
#[async_trait::async_trait]
|
||||
#[allow(unused_variables)]
|
||||
pub trait VirtualNetworking: fmt::Debug + Send + Sync + 'static {
|
||||
/// Establishes a web socket connection
|
||||
/// (note: this does not use the virtual sockets and is standalone
|
||||
/// functionality that works without the network being connected)
|
||||
async fn ws_connect(&self, url: &str) -> Result<Box<dyn VirtualWebSocket + Sync>> {
|
||||
Err(NetworkError::Unsupported)
|
||||
}
|
||||
|
||||
/// Bridges this local network with a remote network, which is required in
|
||||
/// order to make lower level networking calls (such as UDP/TCP)
|
||||
async fn bridge(
|
||||
@@ -283,34 +276,6 @@ pub enum StreamSecurity {
|
||||
DoubleEncryption,
|
||||
}
|
||||
|
||||
/// Interface used for sending and receiving data from a web socket
|
||||
#[async_trait::async_trait]
|
||||
pub trait VirtualWebSocket: fmt::Debug + Send + Sync + 'static {
|
||||
/// Sends out a datagram or stream of bytes on this socket
|
||||
async fn send(&mut self, data: Bytes) -> Result<usize>;
|
||||
|
||||
/// FLushes all the datagrams
|
||||
fn flush(&mut self) -> Result<()>;
|
||||
|
||||
/// Recv a packet from the socket
|
||||
async fn recv(&mut self) -> Result<SocketReceive>;
|
||||
|
||||
/// Recv a packet from the socket
|
||||
fn try_recv(&mut self) -> Result<Option<SocketReceive>>;
|
||||
|
||||
/// Polls the socket for when there is data to be received
|
||||
fn poll_read_ready(
|
||||
&mut self,
|
||||
cx: &mut std::task::Context<'_>,
|
||||
) -> std::task::Poll<Result<usize>>;
|
||||
|
||||
/// Polls the socket for when the backpressure allows for writing to the socket
|
||||
fn poll_write_ready(
|
||||
&mut self,
|
||||
cx: &mut std::task::Context<'_>,
|
||||
) -> std::task::Poll<Result<usize>>;
|
||||
}
|
||||
|
||||
/// Connected sockets have a persistent connection to a remote peer
|
||||
#[async_trait::async_trait]
|
||||
pub trait VirtualConnectedSocket: VirtualSocket + fmt::Debug + Send + Sync + 'static {
|
||||
|
||||
Reference in New Issue
Block a user