Constructor
SoupWebsocketConnectionnew
Declaration [src]
SoupWebsocketConnection*
soup_websocket_connection_new (
GIOStream* stream,
GUri* uri,
SoupWebsocketConnectionType type,
const char* origin,
const char* protocol,
GList* extensions
)
Description [src]
Creates a SoupWebsocketConnection on stream with the given active extensions.
This should be called after completing the handshake to begin using the WebSocket protocol.
Parameters
stream |
GIOStream |
A |
|
| The data is owned by the caller of the function. | |
uri |
GUri |
The URI of the connection. |
|
| The data is owned by the caller of the function. | |
type |
SoupWebsocketConnectionType |
The type of connection (client/side) |
|
origin |
const char* |
The Origin of the client. |
|
The argument can be NULL. | |
| The data is owned by the caller of the function. | |
| The value is a NUL terminated UTF-8 string. | |
protocol |
const char* |
The subprotocol in use. |
|
The argument can be NULL. | |
| The data is owned by the caller of the function. | |
| The value is a NUL terminated UTF-8 string. | |
extensions |
A list of None |
A |
|
| The called function takes ownership of the data, and is responsible for freeing it. |
Return value
| Returns: | SoupWebsocketConnection |
A new |
|
| The caller of the function takes ownership of the data, and is responsible for freeing it. |