mikroSDK Reference Manual
web_socket_transport.h
Go to the documentation of this file.
1
31#ifndef _WEB_SOCKET_TRANSPORT_H
32#define _WEB_SOCKET_TRANSPORT_H
33
34//Dependencies
35#include "core/net.h"
37
38//C++ guard
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43//WebSocket related functions
44error_t webSocketOpenConnection(WebSocket *webSocket);
45
46error_t webSocketEstablishConnection(WebSocket *webSocket,
47 const IpAddr *serverIpAddr, uint16_t serverPort);
48
49error_t webSocketShutdownConnection(WebSocket *webSocket);
50void webSocketCloseConnection(WebSocket *webSocket);
51
52error_t webSocketSendData(WebSocket *webSocket, const void *data,
53 size_t length, size_t *written, uint_t flags);
54
55error_t webSocketReceiveData(WebSocket *webSocket, void *data,
56 size_t size, size_t *received, uint_t flags);
57
58//C++ guard
59#ifdef __cplusplus
60}
61#endif
62
63#endif
error_t
Error codes.
Definition error.h:43
TCP/IP stack core.
IP network address.
Definition ip.h:72
WebSocket API (client and server)