FreeRDP
websocket.h File Reference
#include <winpr/wtypes.h>
#include <winpr/stream.h>
#include <freerdp/api.h>
#include "../../crypto/tls.h"
This graph shows which files directly or indirectly include this file:

Data Structures

struct  websocket_context
 

Macros

#define WEBSOCKET_MASK_BIT   0x80
 
#define WEBSOCKET_FIN_BIT   0x80
 

Enumerations

enum  WEBSOCKET_OPCODE {
  WebsocketContinuationOpcode = 0x0 , WebsocketTextOpcode = 0x1 , WebsocketBinaryOpcode = 0x2 , WebsocketCloseOpcode = 0x8 ,
  WebsocketPingOpcode = 0x9 , WebsocketPongOpcode = 0xa
}
 
enum  WEBSOCKET_STATE {
  WebsocketStateOpcodeAndFin , WebsocketStateLengthAndMasking , WebsocketStateShortLength , WebsocketStateLongLength ,
  WebSocketStateMaskingKey , WebSocketStatePayload
}
 

Functions

FREERDP_LOCAL BOOL websocket_write_wstream (BIO *bio, wStream *sPacket, WEBSOCKET_OPCODE opcode)
 
FREERDP_LOCAL int websocket_write (BIO *bio, const BYTE *buf, int isize, WEBSOCKET_OPCODE opcode)
 
FREERDP_LOCAL int websocket_read (BIO *bio, BYTE *pBuffer, size_t size, websocket_context *encodingContext)
 

Macro Definition Documentation

◆ WEBSOCKET_FIN_BIT

#define WEBSOCKET_FIN_BIT   0x80

◆ WEBSOCKET_MASK_BIT

#define WEBSOCKET_MASK_BIT   0x80

FreeRDP: A Remote Desktop Protocol Implementation Websocket Framing

Copyright 2023 Michael Saxl mike@.nosp@m.mwsy.nosp@m.s.min.nosp@m.e.bz

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Enumeration Type Documentation

◆ WEBSOCKET_OPCODE

Enumerator
WebsocketContinuationOpcode 
WebsocketTextOpcode 
WebsocketBinaryOpcode 
WebsocketCloseOpcode 
WebsocketPingOpcode 
WebsocketPongOpcode 

◆ WEBSOCKET_STATE

Enumerator
WebsocketStateOpcodeAndFin 
WebsocketStateLengthAndMasking 
WebsocketStateShortLength 
WebsocketStateLongLength 
WebSocketStateMaskingKey 
WebSocketStatePayload 

Function Documentation

◆ websocket_read()

FREERDP_LOCAL int websocket_read ( BIO *  bio,
BYTE pBuffer,
size_t  size,
websocket_context encodingContext 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ websocket_write()

FREERDP_LOCAL int websocket_write ( BIO *  bio,
const BYTE buf,
int  isize,
WEBSOCKET_OPCODE  opcode 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ websocket_write_wstream()

FREERDP_LOCAL BOOL websocket_write_wstream ( BIO *  bio,
wStream sPacket,
WEBSOCKET_OPCODE  opcode 
)
Here is the call graph for this function:
Here is the caller graph for this function: