Webserver+3d print

Dependents:   Nucleo

Embed: (wiki syntax)

« Back to documentation index

web_socket_transport.h File Reference

web_socket_transport.h File Reference

WebSocket transport layer. More...

Go to the source code of this file.

Functions

error_t webSocketOpenConnection (WebSocket *webSocket)
 Open network connection.
error_t webSocketEstablishConnection (WebSocket *webSocket, const IpAddr *serverIpAddr, uint16_t serverPort)
 Establish network connection.
error_t webSocketShutdownConnection (WebSocket *webSocket)
 Shutdown network connection.
void webSocketCloseConnection (WebSocket *webSocket)
 Close network connection.
error_t webSocketSendData (WebSocket *webSocket, const void *data, size_t length, size_t *written, uint_t flags)
 Send data using the relevant transport protocol.
error_t webSocketReceiveData (WebSocket *webSocket, void *data, size_t size, size_t *received, uint_t flags)
 Receive data using the relevant transport protocol.

Detailed Description

WebSocket transport layer.

License

Copyright (C) 2010-2017 Oryx Embedded SARL. All rights reserved.

This file is part of CycloneTCP Open.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Author:
Oryx Embedded SARL (www.oryx-embedded.com)
Version:
1.7.6

Definition in file web_socket_transport.h.


Function Documentation

void webSocketCloseConnection ( WebSocket *  webSocket )

Close network connection.

Parameters:
[in]webSocketHandle to a WebSocket

Definition at line 218 of file web_socket_transport.c.

error_t webSocketEstablishConnection ( WebSocket *  webSocket,
const IpAddr serverIpAddr,
uint16_t  serverPort 
)

Establish network connection.

Parameters:
[in]webSocketHandle to a WebSocket
[in]serverIpAddrIP address of the WebSocket server to connect to
[in]serverPortTCP port number that will be used to establish the connection
Returns:
Error code

Definition at line 140 of file web_socket_transport.c.

error_t webSocketOpenConnection ( WebSocket *  webSocket )

Open network connection.

Parameters:
[in]webSocketHandle to a WebSocket
Returns:
Error code

Definition at line 48 of file web_socket_transport.c.

error_t webSocketReceiveData ( WebSocket *  webSocket,
void *  data,
size_t  size,
size_t *  received,
uint_t  flags 
)

Receive data using the relevant transport protocol.

Parameters:
[in]webSocketHandle to a WebSocket
[out]dataBuffer into which received data will be placed
[in]sizeMaximum number of bytes that can be received
[out]receivedNumber of bytes that have been received
[in]flagsSet of flags that influences the behavior of this function
Returns:
Error code

Definition at line 286 of file web_socket_transport.c.

error_t webSocketSendData ( WebSocket *  webSocket,
const void *  data,
size_t  length,
size_t *  written,
uint_t  flags 
)

Send data using the relevant transport protocol.

Parameters:
[in]webSocketHandle to a WebSocket
[in]dataPointer to a buffer containing the data to be transmitted
[in]lengthNumber of bytes to be transmitted
[out]writtenActual number of bytes written (optional parameter)
[in]flagsSet of flags that influences the behavior of this function
Returns:
Error code

Definition at line 252 of file web_socket_transport.c.

error_t webSocketShutdownConnection ( WebSocket *  webSocket )

Shutdown network connection.

Parameters:
[in]webSocketHandle to a WebSocket
Returns:
Error code

Definition at line 172 of file web_socket_transport.c.