Coder Social home page Coder Social logo

robotconscience / ofxlibwebsockets Goto Github PK

View Code? Open in Web Editor NEW
171.0 22.0 69.0 102.6 MB

[Deprecated] openFrameworks wrapper of libwebsockets for WebSocket client and server functionality

License: Other

Makefile 4.19% C++ 16.52% Objective-C++ 0.14% GLSL 0.30% JavaScript 2.16% CSS 0.13% HTML 0.30% C 75.96% CMake 0.30% Shell 0.01%
libwebsockets openframeworks deprecated

ofxlibwebsockets's Introduction

Note on updating

  • There is a newer repo featuring the latest-and-greatest libwebsockets library here: ofxLws
  • This repo is no longer supported, but will remain online for folks still using it

[Deprecated] ofxLibwebsockets

Examples: Basic

  • example_client_hello_world
    • The simplest example: open up a Websocket to echo.websocket.org and say "hello"!
  • example_server_echo
    • A basic Websocket server you can connect to from your browser (http://localhost:9092) to send messages back and forth
    • Includes a simple javascript example that is hosted by the app
    • Can also connect to example_client_hello_world
  • shared canvas
    • example_server_sharedcanvas + example_client_sharedcanvas
    • Clients in openFrameworks and javascript can collaboratively draw on a canvas

Examples: Advanced

  • basic binary
    • example_server_binary and example_server_binaryvideo
    • demonstrates a custom binary setup, sending the raw pixels from OF to javascript
    • requires a bit of processing on the javascript side, please see the code in data/web
  • optimized binary
    • example_server_blob, example_client_blob, example_server_blobvideo
    • requires my fork of ofxTurboJpeg
    • demonstrates how to send true binary data (i.e. a file) via ofxLibwebsockets
      • check out the javascript code in example_server_blob/bin/data/web
      • example_client_blob can connect to either server!
    • thanks to @zebradog for the start of these examples!
  • screen syncing via binary
    • example_particles_server and example_particles_client
      • demonstrates how to sync GPU particles (from the OF GPU particle example) via binary websockets

A note on license

  • libwebsockets is released under a LGPL v2.1, with a special rider that programs that link against a statically built version of the library do not count as derivative, and are not bound to the LGPL v2.1 license conditions. Thus this addon comes with statically built libraries to provide the flexibility of the MIT license.
  • https://github.com/warmcat/libwebsockets/blob/master/LICENSE

Adding to Projects

  • OS X

    • Via OF Project Generator:
      1. Delete ofxLibwebsockets/libs/libwebsockets/include/win32port
      2. Add ofxLibwebsockets to your addons via the projectGenerator
      3. That's it!
    • Adding to a new/existing project:
      • Include ofxLibwebsockets' xcconfig file via your project's Project.xcconfig file:

        1. Define where it lives: OFX_LWS_PATH = "$(OF_PATH)/addons/ofxLibwebsockets"
        2. Include ofxLibwebsockets xcconfig #include "../../../addons/ofxLibwebsockets/ofxLibwebsockets.xcconfig"
        3. Add to existing vars in Project.xcconfig:
         OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OFX_LWS_LIBS)
         HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 
         USER_HEADER_SEARCH_PATHS = $(OFX_LWS_INCLUDES)
         LIBRARY_SEARCH_PATHS = $(inherited) $(OFX_LWS_SEARCH)
        
  • Windows

    • Note: On Windows projects must be compiled for 64-bit to run

    • Via OF Project Generator

      1. Add ofxLibwebsockets to your addons
      2. Open your new project
    • Adding to new/existing project:

      1. Add the ofxLibwebsockets source files to the C++ Linker

        • right click on project in the solution explorer, click "Properties", Go down to C++ > General
        • click the arrow at the right of "Additional include directories" and select "edit"
        • add the ofxLibwebsockets source files:
        ..\..\..\addons\ofxLibwebsockets\libs\jsoncpp
        ..\..\..\addons\ofxLibwebsockets\libs\jsoncpp\json
        ..\..\..\addons\ofxLibwebsockets\libs\libwebsockets\include\
        ..\..\..\addons\ofxLibwebsockets\libs\openssl\openssl
        ..\..\..\addons\ofxLibwebsockets\libs\ofxLibwebsockets\include
        ..\..\..\addons\ofxLibwebsockets\libs\ofxLibwebsockets\include\ofxLibwebsockets
        ..\..\..\addons\ofxLibwebsockets\libs\ofxLibwebsockets\src
        ..\..\..\addons\ofxLibwebsockets\src
        ..\..\..\addons\ofxLibwebsockets\libs\libwebsockets\include\win32port
        ..\..\..\addons\ofxLibwebsockets\libs\libwebsockets\include\win32port\win32helpers
        
      2. Add the ofxLibwebsockets paths to the "Additional Library Directories":

        • right click on project in the solution explorer, click "Properties", Go down to Linker > General
        • click the arrow at the right of "Additional Library Directories" and select "edit"
        • In your debug scheme, add

        ..\..\..\addons\ofxLibwebsockets\libs\libwebsockets\lib\win32\Debug

        • In your release scheme, add

        ..\..\..\addons\ofxLibwebsockets\libs\libwebsockets\lib\win32\Release

        • and if you need to use OpenSSL, add:

        ..\..\..\addons\ofxLibwebsockets\libs\libwebsockets\libs\openssl\lib\win32

      3. Now go down to Linker > Input; open the editor "Additional dependencies" the same way

        • Add websockets_static.lib and ZLIB.lib
  • Linux

    • Use openFramework's projectgenerator and voilà!

Building libwebockets

ofxLibwebsockets uses libwebsockets 1.4

OS X

  • If you're using El Capitan, make sure you have OpenSSL x86_64 & i386 installed and linked properly. If not, install using homebrew:
brew install openssl --universal
brew link openssl --force
  • Clone libwebsockets
cd /path/to/libwebsockets
mkdir build
cd build
cmake "-DCMAKE_OSX_ARCHITECTURES=x86_64;i386" ..
make
cmake -DCMAKE_INSTALL_PREFIX:PATH=./install . && make install

Raspberry Pi

  • Clone libwebsockets
cd /path/to/libwebsockets
mkdir build
cd build
cmake .. -DLWS_IPV6=OFF
make

Linux

  • Clone libwebsockets
cd /path/to/libwebsockets
mkdir build
cd build
cmake ..
make
cp lib/libwebsockets.a /path/to/ofxLibwebsocket/libs/libwebsockets/lib/linux64/

iOS

  • Clone libwebsockets
  • Clone this repo; it contains compiling resources in ofxLibwebsockets/extras/ios_libwebsockets
    • The toolchain in this folder will allow you to create an iOS XCode project
    • NOTE: CMake is not my specialty, so this file is currently hard-coded to use iOS 8.0... change line 89 if you'd like to use a different iOS
  • Create Xcode projects
cd /path/to/libwebsockets
mkdir build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=/path/to/ofxLibwebsockets/extras/ios_libwebsockets/toolchain/iOS.cmake -GXcode ..
  • Replace lws_config.h in your build folder with the one at ofxLibwebsockets/extras/ios_libwebsockets/lws_config.h
  • Open the Xcode project in your build folder
  • Select the target 'websockets' (instead of ALL_BUILD) and select iOS Device as your target
    • Click on the scheme and select "Edit Scheme"
    • Set the Build Configuration to "Release"
  • Build the project
  • Copy the lib into place:
cd /path/to/your/build/folder
cp lib/Relase/libwebsockets.a /PATH/TO/OF/addons/ofxLibwebsockets/libs/libwebsockets/lib/iosarmv7/libwebsockets.a

Windows (Visual Studio, x64)

  • Install OpenSSL

  • Build libwebsockets

    • libwebsockets' Build Instructions, for reference
    • Download libwebsockets v1.3
    • Open the CMake GUI, cmake-gui.exe
    • Create a build folder inside the libwebsockets source folder
    • Set paths in CMake GUI to your source & build folders
    • Click Configure
    • Select Visual Studio 14 2015 Win64 from dropdown, and leave default setting of Use default native compilers
    • Click Finish
    • Click Generate
    • Open build\libwebsockets.sln from your source folder
    • Compile the ALL_BUILD project in Debug and Release modes
    • Copy websockets_static.lib and ZLIB.lib from build\lib\[Debug|Release\] into the proper locations in ofxLibwebsockets. You don't need websockets.lib or websockets.exp

ofxlibwebsockets's People

Contributors

chuckleplant avatar daandelange avatar dboleslawski avatar dfashbaugh avatar fishkingsin avatar fx-lange avatar geistyp avatar jeffcrouse avatar kalwalt avatar mattfelsen avatar orgicus avatar rc1 avatar robotconscience avatar smallfly avatar tyhenry avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ofxlibwebsockets's Issues

Client events on main threads

I spotted that the Client callbacks are not running on the main thread.

Would this be desirable? I thought having these callbacks on a separate thread would have cause problems, but I not sure it does or has ever for me. I can make a PR if it is desirable.

Thanks.
Ross

Possible to run ofxLibwebsockets as client and connect to localhost?

I'm trying to get my OF app using the ofxLibwebsockets addon to connect to my localhost on port :4200 and am running into connection issues. I can connect to the echo.websockets.org example in the package but no dice for anything locally.

I have the host, protocol, port etc... set up however the only thing that I can see that might be causing the issue is the bUseSSL option. It formats the url that is making the request to xxx.xxx.x.xxx:4200/:0 when I set bUseSSL to false -- since I'm not using SSL.

I'm running Node.js as my local server and I'm doing the websockets with Socket.io. I can also connect to my localhost from other web devices on the network using the localhost's IP without an issue connecting to xxx.xxx.x.xxx:4200

The verbose log i'm getting from OF is

[verbose] [ofxLibwebsockets] connect: xxx.xxx.x.xxx:4200/:0
[verbose] [ofxLibwebsockets] Setting timeout 10
[verbose] [ofxLibwebsockets] LWS_CALLBACK_OPENSSL_LOAD_EXTRA_CLIENT_VERIFY_CERTS
[verbose] [ofxLibwebsockets] LWS_CALLBACK_PROTOCOL_INIT
[verbose] [ofxLibwebsockets] libwebsocket init success
[verbose] [ofxLibwebsockets] LWS_CALLBACK_LOCK_POLL
[verbose] [ofxLibwebsockets] LWS_CALLBACK_ADD_POLL_FD
[verbose] [ofxLibwebsockets] LWS_CALLBACK_UNLOCK_POLL
[verbose] [ofxLibwebsockets] LWS_CALLBACK_LOCK_POLL
[verbose] [ofxLibwebsockets] LWS_CALLBACK_CHANGE_MODE_POLL_FD
[verbose] [ofxLibwebsockets] LWS_CALLBACK_UNLOCK_POLL
[verbose] [ofxLibwebsockets] Connection successfully created. Connecting.
[ error ] [ofxLibwebsockets] Connection error
on close

For the ofxLibwebsockets addon to work does it need to be connecting to a remote server like Heroku? And is there a way to remove the "/:0:" from the end of the url being requested in the plugin?

Any guidance would be awesome too!

Cheers,

getifaddrs() fails

I am working on an iOS app, and I find getifaddrs() fails (errno 6). This is not supposed to fail, and what I think is happening is that my app is using libWebSocket's own getifaddrs(). I think libWebSocket only provides its own getifaddrs() for platforms that don't have their own (i.e. windows), so I wonder if the iOS lib can be recompiled without getifaddrs() ?

I see in ofxLibwebsockets/libs/libwebsockets/include/lws_config.h

/* Define to 1 if we have getifaddrs */
#define HAVE_GETIFADDRS

Init fails on RaspberryPi 2

The initialization just fails without any specific reason.
I tried it with 0.8.4 + master branch, 0.9.0 + master branch and 0.9.0 with 0.9.0 branch.
Also tried it with different server examples, all have the same issue.
The client examples gives a success for the init but are unable to connect.
Any ideas?

[notice ] ofAppEGLWindow: setupPeripherals(): native event setup complete
[ error ] [ofxLibwebsockets] libwebsockets init failed

OFX 0.9 Last / Cant compile basic examples

Dont know if it is linked..

Xcode 7.0.1

Mac OSX 10.11.2

Undefined symbols for architecture x86_64:
"ofxLibwebsockets::lws_client_callback(libwebsocket_context, libwebsocket, libwebsocket_callback_reasons, void, void, unsigned long)", referenced from:
ofxLibwebsockets::Client::connect(ofxLibwebsockets::ClientOptions) in Client.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Support ping messages

Right now, forces client to close for some reason. libwebsockets supports them, shouldn't be too bad.

Windows issue

does anyone got examples working with windows? something weird happening in my case,some of the examples doesn't work i.e the particles one. some of the example got very lagging issue as you can see from the video clip. the older version working just great,see the last part of video(but i was build that vs library long time ago can recall which version was)

@mattfelsen does those examples works for you? i'm tested with of 090&vs2015&win10
the testing result video link https://vimeo.com/146878141

How to use ofxLibwebsockets on RaspberryPI

I've tried to compile example_server_echo from the addon examples, but ran into this error:

make[1]: *** No rule to make target `../../../addons/obj/linuxarmv6l/Release/ofxLibwebsockets/libs/ofxLibwebsockets/src/ofxLibwebsockets.h', needed by `bin/ofxLibwebsocketsTest'.  Stop.
make: *** [Release] Error 2

How can I get past that and use ofxLibwebsockets ? I am using OpenFrameworks 0.8.0 on RaspberryPI (3.10.36+ #665 PREEMPT Wed Apr 9 15:01:53 BST 2014 armv6l GNU/Linux)

ERROR writing to socket

I've try to make the binary examples work on OS X Maverick (10.9.1) and linux, neither worked.
I always get errors like:

new connection open
1440000
realloc from 1024 to 1440000
ERROR writing to socket

When I debug, I end up in the sendBinary function of Connection.cpp (line 90):

                n = libwebsocket_write(ws, &binaryBuf[LWS_SEND_BUFFER_PRE_PADDING], size, LWS_WRITE_BINARY);

and n is always negative (I think it should not be).

I've tried the examples of labatrockwell/ofxLibwebsockets as well as blob examples of zebradog / ofxLibwebsockets, neither worked.

Any ideas?

No member addListener

I am trying to run the server examples but I get an error telling me that the server library does not have a member addListener.

server.addListener(this);

Compiler Error C2894 in VS2012

of version: 0.8.0
system: win7 x64
IDE: vs2012

fixed ( add following code to libwebsockets.h) :

#if !defined(WSAAPI)
#ifdef __cplusplus
extern "C++"
{
#include <winsock2.h>
#include <ws2tcpip.h>
}
#else
#include <winsock2.h>
#include <ws2tcpip.h>
#endif
#endif

PS. suggest
Reactor.h -> protected: -> std:string interface will cause some compile error. Compiler think interface is a struct. I think is better to change to interfaceStr or others.

defined but not used warnings

Hi there and great work btw,

I get a lot of these defined but not used [-Wunused-function] warnings and because most of them are located in header files I get them spammed every single compile (independent of what I worked on).

After some digging I think the problem is caused by using static / internal linkage and implementing them in the header files. This way even if the function is used we get the warning (because every translation unit has its own version ...). I still don't get it 100% but tried to tag them as extern and moved the implementations to the source file. Compiles fine but for example the server_echo example crashes on opening the browser client.

Not sure if I'm totally wrong or just missing a tiny thing. Perhaps you could have a quick look at my changes: https://github.com/ixds/ofxLibwebsockets/tree/warnings

The example crashes in

ofxLibwebsockets::lws_callback() at Util.cpp:175 0x425a86 ->
ofxLibwebsockets::Reactor::_http() at Reactor.cpp:283

and document_root seems to be broken.

Any ideas?

Best,
Felix

Server can't receive msg from client

Win64, 0.8.0 vs2012
I have tried dev and master branch.

No SSL. connection success.
dev: server and client can't receive each other, but JS can receive server msg.
master: server to client works, client to server failed, no response.

heroku issues

Hi,

I am trying to link ofxLibwebsockets to a heroku app. The app I deployed on heroku can be found here: http://serene-ridge-5631.herokuapp.com, with the source from this basic example: https://github.com/heroku-examples/node-ws-test. When successfully connected, it echoes the current time.

I used the pre 0.8.4 branch and tested it using the above app hosted on localhost, which was OK, it made the connection and I got the time echoed in the xcode console. The code I used was, based on the basic client example ( the rest of the files are untouched):

void testApp::setup(){
    ofSetLogLevel(OF_LOG_VERBOSE);
    ofxLibwebsockets::ClientOptions options = ofxLibwebsockets::defaultClientOptions();
    options.host="localhost";
    options.channel="/";
    options.port=5000;
    client.connect(options);

    ofSetLogLevel(OF_LOG_ERROR);

    client.addListener(this);
    ofSetFrameRate(60);
}

So the above works, however when I try to connect to the heroku app, it fails:
options.host="serene-ridge-5631.herokuapp.com";
with the following output in the console:

[verbose] [ofxLibwebsockets] connect: serene-ridge-5631.herokuapp.com:5000/:0
[verbose] LWS_CALLBACK_OPENSSL_LOAD_EXTRA_CLIENT_VERIFY_CERTS
[verbose] LWS_CALLBACK_PROTOCOL_INIT
[verbose] [ofxLibwebsockets] libwebsocket init success
[verbose] LWS_CALLBACK_ADD_POLL_FD
[verbose] LWS_CALLBACK_SET_MODE_POLL_FD
[verbose] [ofxLibwebsockets] Connection successfully created. Connecting.
[ error ] [ofxLibwebsockets] Connection error on close

After seeing some discussions here on github, I updated to the 0.8.4 branch but now even the localhost example fails to work, I get the same output as above(with the host being localhost instead). FYI I am running osx 10.9.

Any help on this will be greatly appreciated!
Best,
Andrei

Build issues w/ VS2010

Hi,

I'm having problems building any of the examples or any projects created from the Project Generator that use ofxLibwebsockets. I'm always getting the following error:

1>------ Build started: Project: openframeworksLib, Configuration: Debug Win32 ------
1>  openframeworksLib.vcxproj -> C:\Users\goakley\Downloads\of_v0072_vs2010_release\libs\openFrameworksCompiled\project\vs2010\..\..\lib\vs2010\openframeworksLibDebug.lib
2>------ Build started: Project: example-server-echo, Configuration: Debug Win32 ------
2>  Server.cpp
2>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(18): error C2039: 'clock_t' : is not a member of '`global namespace''
2>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(18): error C2873: 'clock_t' : symbol cannot be used in a using-declaration
2>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(19): error C2039: 'tm' : is not a member of '`global namespace''
2>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(19): error C2873: 'tm' : symbol cannot be used in a using-declaration
2>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(20): error C2039: 'asctime' : is not a member of '`global namespace''
2>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(20): error C2873: 'asctime' : symbol cannot be used in a using-declaration
2>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(20): error C2039: 'clock' : is not a member of '`global namespace''
2>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(20): error C2873: 'clock' : symbol cannot be used in a using-declaration
2>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(20): error C2039: 'ctime' : is not a member of '`global namespace''
2>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(20): error C2873: 'ctime' : symbol cannot be used in a using-declaration
2>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(21): error C2039: 'difftime' : is not a member of '`global namespace''
2>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(21): error C2873: 'difftime' : symbol cannot be used in a using-declaration
2>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(21): error C2039: 'gmtime' : is not a member of '`global namespace''
2>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(21): error C2873: 'gmtime' : symbol cannot be used in a using-declaration
2>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(21): error C2039: 'localtime' : is not a member of '`global namespace''
2>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(21): error C2873: 'localtime' : symbol cannot be used in a using-declaration
2>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(22): error C2039: 'mktime' : is not a member of '`global namespace''
2>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(22): error C2873: 'mktime' : symbol cannot be used in a using-declaration
2>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(22): error C2039: 'strftime' : is not a member of '`global namespace''
2>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(22): error C2873: 'strftime' : symbol cannot be used in a using-declaration
2>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(22): error C2039: 'time' : is not a member of '`global namespace''
2>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(22): error C2873: 'time' : symbol cannot be used in a using-declaration

openFrameworks itself builds without any errors


After further investigation, I found an empty time.h file in ofxLibwebsockets\libs\libwebsockets\include\win32port\win32helpers\sys. Deleting it and excluding it from the project seems to allow the .cpp files to build successfully, although there are then a bunch of linker errors:

1>------ Build started: Project: example-server-echo, Configuration: Debug Win32 ------
1>  testApp.cpp
1>  main.cpp
1>  Server.cpp
1>  Reactor.cpp
1>  Protocol.cpp
1>  Connection.cpp
1>  Client.cpp
1>c:\users\goakley\downloads\of_v0072_vs2010_release\libs\openframeworks\graphics\ofpixels.h(155): warning C4003: not enough actual parameters for macro 'max'
1>c:\users\goakley\downloads\of_v0072_vs2010_release\libs\openframeworks\graphics\ofpixels.h(156): warning C4003: not enough actual parameters for macro 'max'
1>  jsoncpp.cpp
1>  Generating Code...
1>c:\users\goakley\downloads\of_v0072_vs2010_release\addons\ofxlibwebsockets\libs\ofxlibwebsockets\include\ofxlibwebsockets\util.h(229): warning C4715: 'ofxLibwebsockets::getCallbackReason' : not all control paths return a value
1>c:\users\goakley\downloads\of_v0072_vs2010_release\addons\ofxlibwebsockets\libs\ofxlibwebsockets\include\ofxlibwebsockets\util.h(229): warning C4715: 'ofxLibwebsockets::getCallbackReason' : not all control paths return a value
1>  websock-w32.c
1>  gettimeofday.c
1>c:\users\goakley\downloads\of_v0072_vs2010_release\addons\ofxlibwebsockets\libs\libwebsockets\include\win32port\win32helpers\gettimeofday.c(43): warning C4996: '__timezone': This function or variable may be unsafe. Consider using _get_timezone instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>          c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(139) : see declaration of '__timezone'
1>c:\users\goakley\downloads\of_v0072_vs2010_release\addons\ofxlibwebsockets\libs\libwebsockets\include\win32port\win32helpers\gettimeofday.c(44): warning C4996: '__daylight': This function or variable may be unsafe. Consider using _get_daylight instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>          c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(131) : see declaration of '__daylight'
1>  getopt_long.c
1>  getopt.c
1>  Generating Code...
1>     Creating library bin\example-server-echo_debug.lib and object bin\example-server-echo_debug.exp
1>MSVCRTD.lib(cinitexe.obj) : warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
1>Client.obj : error LNK2019: unresolved external symbol _libwebsocket_client_connect referenced in function "public: bool __thiscall ofxLibwebsockets::Client::connect(struct ofxLibwebsockets::ClientOptions)" (?connect@Client@ofxLibwebsockets@@QAE_NUClientOptions@2@@Z)
1>Client.obj : error LNK2019: unresolved external symbol _libwebsocket_create_context referenced in function "public: bool __thiscall ofxLibwebsockets::Client::connect(struct ofxLibwebsockets::ClientOptions)" (?connect@Client@ofxLibwebsockets@@QAE_NUClientOptions@2@@Z)
1>Server.obj : error LNK2001: unresolved external symbol _libwebsocket_create_context
1>Client.obj : error LNK2001: unresolved external symbol _libwebsocket_internal_extensions
1>Server.obj : error LNK2001: unresolved external symbol _libwebsocket_internal_extensions
1>Client.obj : error LNK2019: unresolved external symbol _libwebsockets_get_protocol referenced in function "int __cdecl ofxLibwebsockets::lws_client_callback(struct libwebsocket_context *,struct libwebsocket *,enum libwebsocket_callback_reasons,void *,void *,unsigned int)" (?lws_client_callback@ofxLibwebsockets@@YAHPAUlibwebsocket_context@@PAUlibwebsocket@@W4libwebsocket_callback_reasons@@PAX3I@Z)
1>Server.obj : error LNK2001: unresolved external symbol _libwebsockets_get_protocol
1>Client.obj : error LNK2019: unresolved external symbol _libwebsocket_context_destroy referenced in function "public: void __thiscall ofxLibwebsockets::Client::close(void)" (?close@Client@ofxLibwebsockets@@QAEXXZ)
1>Reactor.obj : error LNK2001: unresolved external symbol _libwebsocket_context_destroy
1>Client.obj : error LNK2019: unresolved external symbol _libwebsocket_close_and_free_session referenced in function "public: void __thiscall ofxLibwebsockets::Client::close(void)" (?close@Client@ofxLibwebsockets@@QAEXXZ)
1>Reactor.obj : error LNK2001: unresolved external symbol _libwebsocket_close_and_free_session
1>Client.obj : error LNK2019: unresolved external symbol _libwebsocket_service referenced in function "private: virtual void __thiscall ofxLibwebsockets::Client::threadedFunction(void)" (?threadedFunction@Client@ofxLibwebsockets@@EAEXXZ)
1>Server.obj : error LNK2001: unresolved external symbol _libwebsocket_service
1>Connection.obj : error LNK2019: unresolved external symbol _libwebsockets_get_peer_addresses referenced in function "public: void __thiscall ofxLibwebsockets::Connection::setupAddress(void)" (?setupAddress@Connection@ofxLibwebsockets@@QAEXXZ)
1>Reactor.obj : error LNK2001: unresolved external symbol _libwebsockets_get_peer_addresses
1>Connection.obj : error LNK2019: unresolved external symbol _libwebsocket_get_socket_fd referenced in function "public: void __thiscall ofxLibwebsockets::Connection::setupAddress(void)" (?setupAddress@Connection@ofxLibwebsockets@@QAEXXZ)
1>Connection.obj : error LNK2019: unresolved external symbol _libwebsocket_write referenced in function "public: void __thiscall ofxLibwebsockets::Connection::send(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?send@Connection@ofxLibwebsockets@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>Connection.obj : error LNK2019: unresolved external symbol _lws_b64_encode_string referenced in function "public: void __thiscall ofxLibwebsockets::Connection::sendBinary(unsigned char *,unsigned int)" (?sendBinary@Connection@ofxLibwebsockets@@QAEXPAEI@Z)
1>Connection.obj : error LNK2019: unresolved external symbol _lws_b64_decode_string referenced in function "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const __thiscall ofxLibwebsockets::Connection::recv(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?recv@Connection@ofxLibwebsockets@@QAE?BV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV34@@Z)
1>Protocol.obj : error LNK2019: unresolved external symbol _libwebsockets_broadcast referenced in function "public: void __thiscall ofxLibwebsockets::Protocol::broadcast(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?broadcast@Protocol@ofxLibwebsockets@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>Reactor.obj : error LNK2019: unresolved external symbol _libwebsockets_serve_http_file referenced in function "public: unsigned int __thiscall ofxLibwebsockets::Reactor::_http(struct libwebsocket *,char const * const)" (?_http@Reactor@ofxLibwebsockets@@QAEIPAUlibwebsocket@@QBD@Z)
1>bin\example-server-echo_debug.exe : fatal error LNK1120: 14 unresolved externals
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========

Any ideas?

Support for Heroku

Currently it seems like it doesn't work making connections directly from ofxLibwebsockets to a heroku hosted node application. I've seen that it might have something to do with a bug in libwebsockets (warmcat/libwebsockets#137) and it should have been resolved in a newer version. I also saw that the branch 0.8.4 has an updated version of libwebsockets, but i can't get that branch to work.

Any news about this?

needs to use ofxJSON

the addon uses an internal jsoncpp lib it should use the existing addon ofxJSON.

Different platforms, different results

Hi, and thanks for this amazing addon!

I'm writing an app for the RPi/RPi2 using ofxLibwebsockets and have been building and running succesfully, and accessing the html on port 9092 from within the pi's browser and from remote clients in my network.

However I've been facing some issues when trying to load the html on remote clients and achieving a consistent websocket connection. There were situations where the websocket doesn't connect at all and the browser isn't detected, and others where it would connect about 60% of times as I would refresh the page.

To try to figure out what was going on I've compiled and run example_server_sharedcanvas in 3 different platforms and achieved very different results in terms of socket connection reliability.

I'll try to sum it up:

-> When running on MacBook Pro + OS X 10.10.3

-- socket connects 100%
---- over wifi - iphone
---- over lan - win 7, ubuntu vm

-> When running on Ubuntu 14.04.1 VM

-- socket connects 100%
---- over lan - win 7, os x, rpi2

-- socket doesn't connect
---- over wifi - iphone
---- over lan - rpi2

-> When running on RPi2 w/ Raspbian Wheezy

-- socket connects 100%
---- over lan - win 7

-- socket doesn't connect
---- over wifi - iphone
---- over lan - os x, ubuntu

Since the OS X version works with all client platforms and browsers and my mac is quite new, this seems like a performance issue on the server side. Could also be caused by some bug on the libwebsocket builds on the linux platforms.

Is there any solution on the JS side? (I'm a JS dummy) Or is there anything else you can think of that might be causing these discrepancies?

Thanks!!
Pedro.

error handling on disconnect

i am trying to figure out how to catch my client getting disconnected from the server. for example when i unplug the ethernet cable onClose is not called. an onError would be great :)

i should mention that my client only listens to incoming messages.
i tried if(client.getConnection() == false) but this only is set to false if the network connection is not present before and right at start of app.

thanks, stephan

missing mention of openssl dependency?

I don't see a reference to the dependency to openssl. Got a build error that these files were missing:

../../../addons/ofxLibwebsockets/libs/openssl/lib/osx/libcrypto.a
../../../addons/ofxLibwebsockets/libs/openssl/lib/osx/libssl.a

Had to get openssl, configure and build and then create that directory path and copy those generated files from /usr/local/ssl/macos-x86_64/lib. Hope I didn't miss something in your guide...

does not work very well with TP-Link TL-WR940N

I have an installation work with ofxLibwebsockets, it have been test with my Apple Timecapsule. it worked very well fast response, smooth.
however , when i used TP-Link TL-WR940N today
it could not connect with the server.
local host work well

Don't trust TP-Link product

unable to compile in codeblocks 12.11 - windows

Hi, its so much time that i didn't use OF and this addon but i think there is some changes in OF that don't let me compile in Windows OS. I used this addon in the past on a linux64 machine, honestly i didn't remember if i try it on windows. But OF Project generator now is changed and you must setup the linker, i added ( in release mode) the libs as you suggested ( i think you refer to visual studio in the readme.md) but in this way i can't compile the project. if l link it also the websocket.lib i can compile, the app start but i receive an error:

impossible to run the app because wbsocketts.dll is missed.

maybe it's needed to add a flag? or what else?
Thank you
Walter

Xcode: "ofxLibwebsockets/Client.h" file not found.

The example runs fine but when I add ofxLibwebsockets to my own project I get loads of errors for:

#include ofxLibwebsockets/Client.h"   <---- file not found.

Or to be more specific, it is for evert reference to:

#include ofxLibwebsockets/Header.h"   <---- file not found.

I could not find out what was going wrong or what the difference is. However, I found that I could do one of the following:

dirty:
Remove the ofxLibwebsockets/ from each #include

better:
Change Project.xconfig from

HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) $(OFX_LWS_INCLUDES)

to

HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 
USER_HEADER_SEARCH_PATHS = $(OFX_LWS_INCLUDES)

Does this make sense? Anyone else have this problem on OS X?

I don't know why the last solution works : ). Happy to make a PR is this is right. Wery grateful for any hints why it doesn't work for me if not!

Thanks,
Ross

connection closed event

Hi,

I'm running tests using the example_server_binary_video with videos of many different formats.
I usually loose the connection with the client. I would like to know how to start looking for solutions/debugging. I'm quite new at websockets programing so sorry for my very naive questions.

Is it possible to automatically reconnect after a close event?
Is the close event due to a lack of time in the javascript side to process the event? if so could that be solved?
Has anybody done some tests with heavy videos or high framerates?

I will be looking at this addon for a while so any hints will be very appreciated!

Best,
J

BTW is it better to discuss this at the of forum?

My specs:
Visual Studio 2015 (Win 7 Pro)
Firefox 43.0.4
libwebsockets-1.3-chrome37-firefox30

osx oF0.9 32 bit

Hi

Its possible to use this addon in oF0.9?, im trying to compile the examples and get

Undefined symbols for architecture i386

Thanks!

libwebsockets_service called without lock in Client

I don't really know if this is an issue but I noticed that in the threadedFunction of Client.cpp
libwebsocket_service(); is called within lock() and unlock() commands:

lock();
libwebsocket_service(context, waitMillis);
unlock();

while in Client.cpp it's called without locking:

 int n = libwebsocket_service(context, waitMillis);

Is there a reason for this?

I was experiencing some really weird bugs the other day (that I'm unable to reproduce) in a project using a ofxLibWebsockets Client instance for communication with a node server. Even though I have limited knowledge of threading in general it seemed like the kind of bug that might be caused by a race condition.

'json/reader.h' file not found

Using ofxLibwebsockets & ofxJSON in the same project (of_v0.8.4_osx_release ) seems to cause the error above. Is there a solution for this?

Thanks,
David

How to use ofxLibwebsockets on ubuntuARM ?

Hi,

I've just tried to compile example_client_hello_world on an ODroid-U3 (ARMv7) running Ubuntu 13,
but ran into loads of errors:

odroid@odroid:~/odroid-development/of/addons/ofxLibwebsockets/example_client_hello_world$ make
checking pkg-config libraries:   cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa gtk+-3.0 libmpg123 glesv1_cm glesv2 egl 
Compiling OF library for Release
checking pkg-config libraries:   cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa gtk+-3.0 libmpg123 glesv1_cm glesv2 egl 
make[1]: Entering directory `/home/odroid/odroid-development/of/libs/openFrameworksCompiled/project'
checking pkg-config libraries:   cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa gtk+-3.0 libmpg123 glesv1_cm glesv2 egl 
make[2]: Nothing to be done for `ReleaseABI'.
checking pkg-config libraries:   cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa gtk+-3.0 libmpg123 glesv1_cm glesv2 egl 
Done!
make[1]: Leaving directory `/home/odroid/odroid-development/of/libs/openFrameworksCompiled/project'


Compiling example_client_hello_world for Release
checking pkg-config libraries:   cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa gtk+-3.0 libmpg123 glesv1_cm glesv2 egl 
make[1]: Entering directory `/home/odroid/odroid-development/of/addons/ofxLibwebsockets/example_client_hello_world'
Compiling src/ofApp.cpp
g++ -c -O3 -Wall -march=armv7 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard -fPIC -ftree-vectorize -Wno-psabi -pipe -DOF_USING_GTK -DOF_USING_GTK -DOF_USING_MPG123 -I./example_client_hello_world.xcodeproj/xcshareddata -I./example_client_hello_world.xcodeproj/xcshareddata/xcschemes -I./src -I../../../addons/ofxLibwebsockets/libs/jsoncpp -I../../../addons/ofxLibwebsockets/libs/jsoncpp/json -I../../../addons/ofxLibwebsockets/libs/libwebsockets/include/ -I../../../addons/ofxLibwebsockets/libs/ofxLibwebsockets/include -I../../../addons/ofxLibwebsockets/libs/ofxLibwebsockets/include/ofxLibwebsockets -I../../../addons/ofxLibwebsockets/libs/ofxLibwebsockets/src -I../../../addons/ofxLibwebsockets/src -pthread -D_REENTRANT -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/gstreamer-1.0 -I/usr/include/alsa -I/usr/include/gtk-3.0 -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/harfbuzz -I/usr/include/libdrm -I../../../libs/fmodex/include -I../../../libs/glfw/include -I../../../libs/glfw/include/GLFW -I../../../libs/kiss/include -I../../../libs/openssl/include -I../../../libs/openssl/include/openssl -I../../../libs/poco/include -I../../../libs/rtAudio/include -I../../../libs/tess2/include -I../../../libs/openFrameworks -I../../../libs/openFrameworks/utils -I../../../libs/openFrameworks/graphics -I../../../libs/openFrameworks/communication -I../../../libs/openFrameworks/math -I../../../libs/openFrameworks/events -I../../../libs/openFrameworks/gl -I../../../libs/openFrameworks/3d -I../../../libs/openFrameworks/types -I../../../libs/openFrameworks/app -I../../../libs/openFrameworks/sound -I../../../libs/openFrameworks/video  -MMD -MP -MF obj/linuxarmv7l/Release/src/ofApp.d -MT obj/linuxarmv7l/Release/src/ofApp.o -o obj/linuxarmv7l/Release/src/ofApp.o -c src/ofApp.cpp
In file included from ../../../addons/ofxLibwebsockets/libs/ofxLibwebsockets/include/ofxLibwebsockets/Util.h:17:0,
                 from ../../../addons/ofxLibwebsockets/src/ofxLibwebsockets.h:3,
                 from src/ofApp.h:5,
                 from src/ofApp.cpp:1:
../../../addons/ofxLibwebsockets/libs/ofxLibwebsockets/include/ofxLibwebsockets/Server.h:43:26: warning: ‘ofxLibwebsockets::ServerOptions ofxLibwebsockets::defaultServerOptions()’ defined but not used [-Wunused-function]
     static ServerOptions defaultServerOptions(){
                          ^
In file included from ../../../addons/ofxLibwebsockets/src/ofxLibwebsockets.h:3:0,
                 from src/ofApp.h:5,
                 from src/ofApp.cpp:1:
../../../addons/ofxLibwebsockets/libs/ofxLibwebsockets/include/ofxLibwebsockets/Util.h:244:17: warning: ‘void ofxLibwebsockets::dump_handshake_info(lws_tokens*)’ defined but not used [-Wunused-function]
     static void dump_handshake_info(struct lws_tokens *lwst)
                 ^
In file included from ../../../addons/ofxLibwebsockets/src/ofxLibwebsockets.h:3:0,
                 from src/ofApp.h:5,
                 from src/ofApp.cpp:1:
../../../addons/ofxLibwebsockets/libs/ofxLibwebsockets/include/ofxLibwebsockets/Util.h:29:16: warning: ‘int ofxLibwebsockets::lws_client_callback(libwebsocket_context*, libwebsocket*, libwebsocket_callback_reasons, void*, void*, size_t)’ defined but not used [-Wunused-function]
     static int lws_client_callback(struct libwebsocket_context* context, struct libwebsocket *ws, enum libwebsocket_callback_reasons reason, void *user, void *data, size_t len){
                ^
In file included from ../../../addons/ofxLibwebsockets/src/ofxLibwebsockets.h:3:0,
                 from src/ofApp.h:5,
                 from src/ofApp.cpp:1:
../../../addons/ofxLibwebsockets/libs/ofxLibwebsockets/include/ofxLibwebsockets/Util.h:127:16: warning: ‘int ofxLibwebsockets::lws_callback(libwebsocket_context*, libwebsocket*, libwebsocket_callback_reasons, void*, void*, size_t)’ defined but not used [-Wunused-function]
     static int lws_callback(struct libwebsocket_context* context, struct libwebsocket *ws,
                ^
Compiling src/main.cpp
g++ -c -O3 -Wall -march=armv7 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard -fPIC -ftree-vectorize -Wno-psabi -pipe -DOF_USING_GTK -DOF_USING_GTK -DOF_USING_MPG123 -I./example_client_hello_world.xcodeproj/xcshareddata -I./example_client_hello_world.xcodeproj/xcshareddata/xcschemes -I./src -I../../../addons/ofxLibwebsockets/libs/jsoncpp -I../../../addons/ofxLibwebsockets/libs/jsoncpp/json -I../../../addons/ofxLibwebsockets/libs/libwebsockets/include/ -I../../../addons/ofxLibwebsockets/libs/ofxLibwebsockets/include -I../../../addons/ofxLibwebsockets/libs/ofxLibwebsockets/include/ofxLibwebsockets -I../../../addons/ofxLibwebsockets/libs/ofxLibwebsockets/src -I../../../addons/ofxLibwebsockets/src -pthread -D_REENTRANT -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/gstreamer-1.0 -I/usr/include/alsa -I/usr/include/gtk-3.0 -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/harfbuzz -I/usr/include/libdrm -I../../../libs/fmodex/include -I../../../libs/glfw/include -I../../../libs/glfw/include/GLFW -I../../../libs/kiss/include -I../../../libs/openssl/include -I../../../libs/openssl/include/openssl -I../../../libs/poco/include -I../../../libs/rtAudio/include -I../../../libs/tess2/include -I../../../libs/openFrameworks -I../../../libs/openFrameworks/utils -I../../../libs/openFrameworks/graphics -I../../../libs/openFrameworks/communication -I../../../libs/openFrameworks/math -I../../../libs/openFrameworks/events -I../../../libs/openFrameworks/gl -I../../../libs/openFrameworks/3d -I../../../libs/openFrameworks/types -I../../../libs/openFrameworks/app -I../../../libs/openFrameworks/sound -I../../../libs/openFrameworks/video  -MMD -MP -MF obj/linuxarmv7l/Release/src/main.d -MT obj/linuxarmv7l/Release/src/main.o -o obj/linuxarmv7l/Release/src/main.o -c src/main.cpp
In file included from ../../../addons/ofxLibwebsockets/libs/ofxLibwebsockets/include/ofxLibwebsockets/Util.h:16:0,
                 from ../../../addons/ofxLibwebsockets/src/ofxLibwebsockets.h:3,
                 from src/ofApp.h:5,
                 from src/main.cpp:2:
../../../addons/ofxLibwebsockets/libs/ofxLibwebsockets/include/ofxLibwebsockets/Client.h:31:26: warning: ‘ofxLibwebsockets::ClientOptions ofxLibwebsockets::defaultClientOptions()’ defined but not used [-Wunused-function]
     static ClientOptions defaultClientOptions(){
                          ^
In file included from ../../../addons/ofxLibwebsockets/libs/ofxLibwebsockets/include/ofxLibwebsockets/Util.h:17:0,
                 from ../../../addons/ofxLibwebsockets/src/ofxLibwebsockets.h:3,
                 from src/ofApp.h:5,
                 from src/main.cpp:2:
../../../addons/ofxLibwebsockets/libs/ofxLibwebsockets/include/ofxLibwebsockets/Server.h:43:26: warning: ‘ofxLibwebsockets::ServerOptions ofxLibwebsockets::defaultServerOptions()’ defined but not used [-Wunused-function]
     static ServerOptions defaultServerOptions(){
                          ^
In file included from ../../../addons/ofxLibwebsockets/src/ofxLibwebsockets.h:3:0,
                 from src/ofApp.h:5,
                 from src/main.cpp:2:
../../../addons/ofxLibwebsockets/libs/ofxLibwebsockets/include/ofxLibwebsockets/Util.h:244:17: warning: ‘void ofxLibwebsockets::dump_handshake_info(lws_tokens*)’ defined but not used [-Wunused-function]
     static void dump_handshake_info(struct lws_tokens *lwst)
                 ^
In file included from ../../../addons/ofxLibwebsockets/src/ofxLibwebsockets.h:3:0,
                 from src/ofApp.h:5,
                 from src/main.cpp:2:
../../../addons/ofxLibwebsockets/libs/ofxLibwebsockets/include/ofxLibwebsockets/Util.h:29:16: warning: ‘int ofxLibwebsockets::lws_client_callback(libwebsocket_context*, libwebsocket*, libwebsocket_callback_reasons, void*, void*, size_t)’ defined but not used [-Wunused-function]
     static int lws_client_callback(struct libwebsocket_context* context, struct libwebsocket *ws, enum libwebsocket_callback_reasons reason, void *user, void *data, size_t len){
                ^
In file included from ../../../addons/ofxLibwebsockets/src/ofxLibwebsockets.h:3:0,
                 from src/ofApp.h:5,
                 from src/main.cpp:2:
../../../addons/ofxLibwebsockets/libs/ofxLibwebsockets/include/ofxLibwebsockets/Util.h:127:16: warning: ‘int ofxLibwebsockets::lws_callback(libwebsocket_context*, libwebsocket*, libwebsocket_callback_reasons, void*, void*, size_t)’ defined but not used [-Wunused-function]
     static int lws_callback(struct libwebsocket_context* context, struct libwebsocket *ws,
                ^
Linking bin/example_client_hello_world for linuxarmv7l
g++ -o bin/example_client_hello_world obj/linuxarmv7l/Release/src/ofApp.o obj/linuxarmv7l/Release/src/main.o  ../../../addons/obj/linuxarmv7l/Release/ofxLibwebsockets/libs/jsoncpp/jsoncpp.o ../../../addons/obj/linuxarmv7l/Release/ofxLibwebsockets/libs/ofxLibwebsockets/src/Client.o ../../../addons/obj/linuxarmv7l/Release/ofxLibwebsockets/libs/ofxLibwebsockets/src/Connection.o ../../../addons/obj/linuxarmv7l/Release/ofxLibwebsockets/libs/ofxLibwebsockets/src/Protocol.o ../../../addons/obj/linuxarmv7l/Release/ofxLibwebsockets/libs/ofxLibwebsockets/src/Server.o ../../../addons/obj/linuxarmv7l/Release/ofxLibwebsockets/libs/ofxLibwebsockets/src/Reactor.o ../../../addons/obj/linuxarmv7l/Release/ofxLibwebsockets/libs/ofxLibwebsockets/src/Events.o ../../../libs/openFrameworksCompiled/lib/linuxarmv7l/libopenFrameworks.a   -Wl,-rpath=./libs:./bin/libs -Wl,--as-needed -Wl,--gc-sections ../../../libs/glfw/lib/linuxarmv7l/libglfw3.a ../../../libs/kiss/lib/linuxarmv7l/libkiss.a ../../../libs/poco/lib/linuxarmv7l/libPocoZip.a ../../../libs/poco/lib/linuxarmv7l/libPocoFoundation.a ../../../libs/poco/lib/linuxarmv7l/libPocoXML.a ../../../libs/poco/lib/linuxarmv7l/libPocoCrypto.a ../../../libs/poco/lib/linuxarmv7l/libPocoNet.a ../../../libs/poco/lib/linuxarmv7l/libPocoUtil.a ../../../libs/poco/lib/linuxarmv7l/libPocoNetSSL.a ../../../libs/rtAudio/lib/linuxarmv7l/libRtAudio.a ../../../libs/tess2/lib/linuxarmv7l/libtess2.a  ../../../libs/poco/lib/linuxarmv7l/libPocoNetSSL.a ../../../libs/poco/lib/linuxarmv7l/libPocoNet.a ../../../libs/poco/lib/linuxarmv7l/libPocoCrypto.a ../../../libs/poco/lib/linuxarmv7l/libPocoUtil.a ../../../libs/poco/lib/linuxarmv7l/libPocoXML.a ../../../libs/poco/lib/linuxarmv7l/libPocoFoundation.a  -lz -lgstapp-1.0 -lgstvideo-1.0 -lgstbase-1.0 -lgstreamer-1.0 -ludev -lfreetype -lfontconfig -lsndfile -lopenal -lssl -lcrypto -lpulse-simple -lpulse -lasound -lgtk-3 -lgdk-3 -latk-1.0 -lgio-2.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lpango-1.0 -lcairo -lgobject-2.0 -lglib-2.0 -lmpg123 -lGLESv1_CM -lGLESv2 -lEGL   -lX11 -lXrandr -lXxf86vm -lXi -lXcursor -ldl -lpthread -lfreeimage 
../../../addons/obj/linuxarmv7l/Release/ofxLibwebsockets/libs/ofxLibwebsockets/src/Client.o: In function `ofxLibwebsockets::Client::threadedFunction()':
Client.cpp:(.text+0x80): undefined reference to `libwebsocket_service'
Client.cpp:(.text+0xa8): undefined reference to `libwebsocket_context_destroy'
../../../addons/obj/linuxarmv7l/Release/ofxLibwebsockets/libs/ofxLibwebsockets/src/Client.o: In function `ofxLibwebsockets::Client::close()':
Client.cpp:(.text+0xe8): undefined reference to `libwebsocket_context_destroy'
../../../addons/obj/linuxarmv7l/Release/ofxLibwebsockets/libs/ofxLibwebsockets/src/Client.o: In function `ofxLibwebsockets::Client::connect(ofxLibwebsockets::ClientOptions)':
Client.cpp:(.text+0x8d2): undefined reference to `lws_set_log_level'
Client.cpp:(.text+0xa08): undefined reference to `libwebsocket_get_internal_extensions'
Client.cpp:(.text+0xa98): undefined reference to `libwebsocket_create_context'
Client.cpp:(.text+0xb8a): undefined reference to `libwebsocket_client_connect'
Client.cpp:(.text+0xc54): undefined reference to `libwebsocket_client_connect'
../../../addons/obj/linuxarmv7l/Release/ofxLibwebsockets/libs/ofxLibwebsockets/src/Client.o: In function `ofxLibwebsockets::lws_client_callback(libwebsocket_context*, libwebsocket*, libwebsocket_callback_reasons, void*, void*, unsigned int)':
Client.cpp:(.text+0x16ea): undefined reference to `libwebsockets_get_protocol'
Client.cpp:(.text+0x1ce2): undefined reference to `libwebsocket_callback_on_writable'
../../../addons/obj/linuxarmv7l/Release/ofxLibwebsockets/libs/ofxLibwebsockets/src/Connection.o: In function `ofxLibwebsockets::Connection::setupAddress()':
Connection.cpp:(.text+0x292): undefined reference to `libwebsocket_get_socket_fd'
Connection.cpp:(.text+0x2ec): undefined reference to `libwebsockets_get_peer_addresses'
../../../addons/obj/linuxarmv7l/Release/ofxLibwebsockets/libs/ofxLibwebsockets/src/Connection.o: In function `ofxLibwebsockets::Connection::update()':
Connection.cpp:(.text+0x34c): undefined reference to `libwebsocket_write'
Connection.cpp:(.text+0x354): undefined reference to `libwebsocket_callback_on_writable'
Connection.cpp:(.text+0x3ce): undefined reference to `libwebsocket_write'
Connection.cpp:(.text+0x3d6): undefined reference to `libwebsocket_callback_on_writable'
Connection.cpp:(.text+0x402): undefined reference to `libwebsocket_callback_on_writable'
Connection.cpp:(.text+0x414): undefined reference to `libwebsocket_callback_on_writable'
Connection.cpp:(.text+0x466): undefined reference to `libwebsocket_write'
Connection.cpp:(.text+0x46e): undefined reference to `libwebsocket_callback_on_writable'
Connection.cpp:(.text+0x554): undefined reference to `libwebsocket_write'
Connection.cpp:(.text+0x55c): undefined reference to `libwebsocket_callback_on_writable'
../../../addons/obj/linuxarmv7l/Release/ofxLibwebsockets/libs/ofxLibwebsockets/src/Connection.o: In function `ofxLibwebsockets::Connection::send(std::string const&)':
Connection.cpp:(.text+0x63c): undefined reference to `libwebsocket_write'
../../../addons/obj/linuxarmv7l/Release/ofxLibwebsockets/libs/ofxLibwebsockets/src/Connection.o: In function `ofxLibwebsockets::Connection::sendBinary(char*, unsigned int)':
Connection.cpp:(.text+0x80c): undefined reference to `libwebsocket_write'
../../../addons/obj/linuxarmv7l/Release/ofxLibwebsockets/libs/ofxLibwebsockets/src/Protocol.o: In function `ofxLibwebsockets::Protocol::broadcast(std::string const&)':
Protocol.cpp:(.text+0xd2): undefined reference to `libwebsocket_callback_on_writable_all_protocol'
../../../addons/obj/linuxarmv7l/Release/ofxLibwebsockets/libs/ofxLibwebsockets/src/Reactor.o: In function `ofxLibwebsockets::Reactor::_allow(libwebsocket*, ofxLibwebsockets::Protocol*, long)':
Reactor.cpp:(.text+0xf8): undefined reference to `libwebsocket_get_socket_fd'
Reactor.cpp:(.text+0x13a): undefined reference to `libwebsockets_get_peer_addresses'
../../../addons/obj/linuxarmv7l/Release/ofxLibwebsockets/libs/ofxLibwebsockets/src/Reactor.o: In function `ofxLibwebsockets::Reactor::_notify(ofxLibwebsockets::Connection*, libwebsocket_callback_reasons, char const*, unsigned int)':
Reactor.cpp:(.text+0xe4c): undefined reference to `libwebsockets_remaining_packet_payload'
Reactor.cpp:(.text+0xe6c): undefined reference to `lws_frame_is_binary'
Reactor.cpp:(.text+0x11c8): undefined reference to `libwebsocket_is_final_fragment'
Reactor.cpp:(.text+0x1248): undefined reference to `libwebsocket_is_final_fragment'
Reactor.cpp:(.text+0x1290): undefined reference to `libwebsocket_is_final_fragment'
../../../addons/obj/linuxarmv7l/Release/ofxLibwebsockets/libs/ofxLibwebsockets/src/Reactor.o: In function `ofxLibwebsockets::Reactor::_http(libwebsocket*, char const*)':
Reactor.cpp:(.text+0x158c): undefined reference to `libwebsockets_serve_http_file'
collect2: error: ld returned 1 exit status
make[1]: *** [bin/example_client_hello_world] Error 1
make[1]: Leaving directory `/home/odroid/odroid-development/of/addons/ofxLibwebsockets/example_client_hello_world'
make: *** [Release] Error 2
odroid@odroid:~/odroid-development/of/addons/ofxLibwebsockets/example_client_hello_world$ 

I'm using openframeworks 0.8.4. linux arm v7

iOS example compiling error

Hi

Im trying to compile the example os iOS but im getting errors building

Undefined symbols for architecture i386:
"libwebsocket_callback_on_writable", referenced from:
ofxLibwebsockets::lws_client_callback(libwebsocket_context
, libwebsocket_, libwebsocket_callback_reasons, void_, void_, unsigned long) in Client.o
ofxLibwebsockets::Connection::update() in Connection.o
ofxLibwebsockets::lws_callback(libwebsocket_context_, libwebsocket_, libwebsocket_callback_reasons, void_, void_, unsigned long) in Server.o
"_libwebsocket_callback_on_writable_all_protocol", referenced from:
.....

i tried to compile the library libwebsocket to see if can get it to compile following the readme but im getting erros in cmake not finding openssl library

time.h file not found

Hi,

I'm trying to use the addon in OF v0073 + XCode 4.5.2, but I get the following error when I try to compile the hello world example project

time.h file not found

windows lagging issue

i was testing with some of the examples,but got really lagging issue between the server&client,which version of libwebsockets are you using ,the v1.3-chrome37-firefox30?

i did complied the older version which is v1.23-chrome32-firefox24,running really fast(not with current ofxLibwebsockets)

just wondering what's the issue might be
cheers

Win32 won't link and/or run on 0.9.0 branch

Ran into this while playing with my new changes. If I use the commandLine pg to make a project, make sure the libs for Win32 match how they were in addon_config.mk (i.e. websockets.lib and zlib_internal.lib), and add the preprocessor definition, I get unresolved symbols when trying to compile. If I add websockets_shared.lib, specifically before websockets.lib rather than after, it will compile but complain about not finding websockets_shared.dll when launching. I assume this was working for you before when you originally created the libs in b05d7d9?

issue in Ubuntu 12.04 64bit

hi, i'm trying to use your addon in Ubuntu 12.04 64bit. , i compiled libwebsockets static lib with makefile , i placed the static lib in a new folder in ~/OF0072/openFrameworks/addons/ofxLibwebsockets/libs/libwebsockets/lib/linux64 but when i try to build the addon i got this error:

-------------- Build: Debug in libopenFrameworks ---------------

Target is up to date.

-------------- Build: Debug in example-client-hello world ---------------

Using makefile: Makefile
compiling x86_64 object for: src/main.cpp
In file included from ../../../libs/openFrameworks/utils/ofConstants.h:305:0,
from ../../../libs/openFrameworks/ofMain.h:5,
from src/main.cpp:1:
/usr/include/c++/4.6/ctime:62:11: error: ‘::clock_t’ has not been declared
/usr/include/c++/4.6/ctime:63:11: error: ‘::time_t’ has not been declared
/usr/include/c++/4.6/ctime:64:11: error: ‘::tm’ has not been declared
/usr/include/c++/4.6/ctime:66:11: error: ‘::clock’ has not been declared
/usr/include/c++/4.6/ctime:67:11: error: ‘::difftime’ has not been declared
/usr/include/c++/4.6/ctime:68:11: error: ‘::mktime’ has not been declared
/usr/include/c++/4.6/ctime:69:11: error: ‘::time’ has not been declared
/usr/include/c++/4.6/ctime:70:11: error: ‘::asctime’ has not been declared
/usr/include/c++/4.6/ctime:71:11: error: ‘::ctime’ has not been declared
/usr/include/c++/4.6/ctime:72:11: error: ‘::gmtime’ has not been declared
/usr/include/c++/4.6/ctime:73:11: error: ‘::localtime’ has not been declared
/usr/include/c++/4.6/ctime:74:11: error: ‘::strftime’ has not been declared
In file included from ../../../libs/poco/include/Poco/File.h:44:0,
from ../../../libs/openFrameworks/utils/ofFileUtils.h:4,
from ../../../libs/openFrameworks/ofMain.h:6,
from src/main.cpp:1:
../../../libs/poco/include/Poco/Timestamp.h:103:2: error: ‘time_t’ in namespace ‘std’ does not name a type
../../../libs/poco/include/Poco/Timestamp.h:125:38: error: ‘std::time_t’ has not been declared
../../../libs/poco/include/Poco/Timestamp.h:217:8: error: ‘time_t’ in namespace ‘std’ does not name a type
In file included from /usr/include/glib-2.0/glib.h:39:0,
from /usr/include/glib-2.0/gobject/gbinding.h:30,
from /usr/include/glib-2.0/glib-object.h:25,
from /usr/include/gstreamer-0.10/gst/gstobject.h:29,
from /usr/include/gstreamer-0.10/gst/gstpad.h:29,
from ../../../libs/openFrameworks/video/ofGstUtils.h:12,
from ../../../libs/openFrameworks/video/ofGstVideoGrabber.h:3,
from ../../../libs/openFrameworks/video/ofVideoGrabber.h:31,
from ../../../libs/openFrameworks/ofMain.h:71,
from src/main.cpp:1:
/usr/include/glib-2.0/glib/gbookmarkfile.h:150:11: error: ‘time_t’ has not been declared
/usr/include/glib-2.0/glib/gbookmarkfile.h:157:11: error: ‘time_t’ has not been declared
/usr/include/glib-2.0/glib/gbookmarkfile.h:176:11: error: ‘time_t’ has not been declared
/usr/include/glib-2.0/glib/gbookmarkfile.h:177:1: error: ‘time_t’ does not name a type
/usr/include/glib-2.0/glib/gbookmarkfile.h:182:11: error: ‘time_t’ has not been declared
/usr/include/glib-2.0/glib/gbookmarkfile.h:183:1: error: ‘time_t’ does not name a type
/usr/include/glib-2.0/glib/gbookmarkfile.h:188:11: error: ‘time_t’ has not been declared
/usr/include/glib-2.0/glib/gbookmarkfile.h:189:1: error: ‘time_t’ does not name a type
In file included from /usr/include/glib-2.0/glib.h:45:0,
from /usr/include/glib-2.0/gobject/gbinding.h:30,
from /usr/include/glib-2.0/glib-object.h:25,
from /usr/include/gstreamer-0.10/gst/gstobject.h:29,
from /usr/include/gstreamer-0.10/gst/gstpad.h:29,
from ../../../libs/openFrameworks/video/ofGstUtils.h:12,
from ../../../libs/openFrameworks/video/ofGstVideoGrabber.h:3,
from ../../../libs/openFrameworks/video/ofVideoGrabber.h:31,
from ../../../libs/openFrameworks/ofMain.h:71,
from src/main.cpp:1:
/usr/include/glib-2.0/glib/gdate.h:174:9: error: ‘time_t’ has not been declared
In file included from ../../../addons/ofxLibwebsockets/src/ofxLibwebsockets.h:3:0,
from src/testApp.h:5,
from src/main.cpp:2:
../../../addons/ofxLibwebsockets/libs/ofxLibwebsockets/include/ofxLibwebsockets/Util.h: In function ‘int ofxLibwebsockets::lws_client_callback(libwebsocket_context_, libwebsocket_, libwebsocket_callback_reasons, void_, void_, size_t)’:
../../../addons/ofxLibwebsockets/libs/ofxLibwebsockets/include/ofxLibwebsockets/Util.h:39:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
../../../addons/ofxLibwebsockets/libs/ofxLibwebsockets/include/ofxLibwebsockets/Util.h:35:22: warning: unused variable ‘conn_ptr’ [-Wunused-variable]
../../../addons/ofxLibwebsockets/libs/ofxLibwebsockets/include/ofxLibwebsockets/Util.h: In function ‘int ofxLibwebsockets::lws_callback(libwebsocket_context_, libwebsocket_, libwebsocket_callback_reasons, void_, void_, size_t)’:
../../../addons/ofxLibwebsockets/libs/ofxLibwebsockets/include/ofxLibwebsockets/Util.h:110:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
../../../addons/ofxLibwebsockets/libs/ofxLibwebsockets/include/ofxLibwebsockets/Client.h: At global scope:
../../../addons/ofxLibwebsockets/libs/ofxLibwebsockets/include/ofxLibwebsockets/Client.h:25:26: warning: ‘ofxLibwebsockets::ClientOptions ofxLibwebsockets::defaultClientOptions()’ defined but not used [-Wunused-function]
../../../addons/ofxLibwebsockets/libs/ofxLibwebsockets/include/ofxLibwebsockets/Server.h:40:26: warning: ‘ofxLibwebsockets::ServerOptions ofxLibwebsockets::defaultServerOptions()’ defined but not used [-Wunused-function]
../../../addons/ofxLibwebsockets/libs/ofxLibwebsockets/include/ofxLibwebsockets/Util.h:169:17: warning: ‘void ofxLibwebsockets::dump_handshake_info(lws_tokens_)’ defined but not used [-Wunused-function]
../../../addons/ofxLibwebsockets/libs/ofxLibwebsockets/include/ofxLibwebsockets/Util.h:29:16: warning: ‘int ofxLibwebsockets::lws_client_callback(libwebsocket_context_, libwebsocket_, libwebsocket_callback_reasons, void_, void_, size_t)’ defined but not used [-Wunused-function]
../../../addons/ofxLibwebsockets/libs/ofxLibwebsockets/include/ofxLibwebsockets/Util.h:94:16: warning: ‘int ofxLibwebsockets::lws_callback(libwebsocket_context_, libwebsocket_, libwebsocket_callback_reasons, void_, void_, size_t)’ defined but not used [-Wunused-function]
make: *_* [obj/x86_64Debug/src/main.o] Errore 1
Process terminated with status 2 (0 minutes, 1 seconds)
24 errors, 8 warnings

maybe do you have an idea of the reason of it?
many thanks

ctime issues in VS10

Trying to port over an Xcode project to VS10 using this library, and I'm running into a bunch of ctime errors. It also appears to be happening when I try running the examples as well. A dump of the errors is below, any ideas?

c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(18): error C2039: 'clock_t' : is not a member of 'global namespace'' 1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(18): error C2873: 'clock_t' : symbol cannot be used in a using-declaration 1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(20): error C2039: 'asctime' : is not a member of 'global namespace''
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(20): error C2873: 'asctime' : symbol cannot be used in a using-declaration
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(20): error C2039: 'clock' : is not a member of 'global namespace'' 1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(20): error C2873: 'clock' : symbol cannot be used in a using-declaration 1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(20): error C2039: 'ctime' : is not a member of 'global namespace''
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(20): error C2873: 'ctime' : symbol cannot be used in a using-declaration
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(21): error C2039: 'difftime' : is not a member of 'global namespace'' 1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(21): error C2873: 'difftime' : symbol cannot be used in a using-declaration 1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(21): error C2039: 'gmtime' : is not a member of 'global namespace''
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(21): error C2873: 'gmtime' : symbol cannot be used in a using-declaration
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(21): error C2039: 'localtime' : is not a member of 'global namespace'' 1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(21): error C2873: 'localtime' : symbol cannot be used in a using-declaration 1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(22): error C2039: 'mktime' : is not a member of 'global namespace''
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(22): error C2873: 'mktime' : symbol cannot be used in a using-declaration
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(22): error C2039: 'strftime' : is not a member of 'global namespace'' 1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(22): error C2873: 'strftime' : symbol cannot be used in a using-declaration 1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(22): error C2039: 'time' : is not a member of 'global namespace''
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\ctime(22): error C2873: 'time' : symbol cannot be used in a using-declaration

libwebsockets_serve_http_file arguments issue

according to the readme, you're using libwebsockets 1.3,so i did complied that under the vs,but it seems still mismatch with your current version,also causing this issue

libwebsockets_serve_http_file Function does not take 6 arguments
are you sure you're using the 1.3 version of libwebsockets?

cheers

ofxTurboJpeg issue-windows

example_server_blob,example_server_blobvideo,example_client_blob
those example depending with ofxTurboJpeg which causing some issue
unsigned char * compressed = turbo.compress(&currentImage,100,&size);
error C2664: “unsigned char ofxTurboJpeg::compress<ofImage>(T &,int,unsigned long *)”: cannot convert parameter 1 from“ofImage *”to “ofImage_ &”
2> with
2> [
2> T=ofImage *
2> ]

cheers

Add Visual Studio project

Will add this when external projects are supported by Project Generator (maybe sooner, but support is still a little limited)

Example failed to set wsi socket options

None of my lws sketches work on Pi but they do work on Xcode. My Pi is a revision '000e' => 'Model B Revision 2.0 512MB', (Sony)

Any suggestions?

e.g for ofxLibwebsockets/example_client_hello_world

[verbose] [ofxLibwebsockets] connect: echo.websocket.org:80/:0
[verbose] [ofxLibwebsockets] Setting timeout 1
[verbose] [ofxLibwebsockets] LWS_CALLBACK_OPENSSL_LOAD_EXTRA_CLIENT_VERIFY_CERTS
[verbose] [ofxLibwebsockets] LWS_CALLBACK_PROTOCOL_INIT
[verbose] [ofxLibwebsockets] libwebsocket init success
[1436273357:2009] ERR: Failed to set wsi socket options
[ error ] [ofxLibwebsockets] client connection failed

Note - I recompiled libwebsockets and replaced lib as per published instructions. test-echo works fine just not the oFx examples
./libwebsockets-test-echo --client echo.websocket.org --ssl --port=443

changing destination from localHost to http:www.mywebpage.com ..... how to?

Hi this may seem really basic and stupid but I cant find how I can change the example_server_binary example so that I can send the dragged image to a webpage instead of running on the local host.

Does it have something to do with options.documentRoot?

I have the contents of bin/data/web running on my web page and it looks just the same as when its running on my local host I just dont know how to tell the oF app to send the image to the site instead of to the one on my localHost... Any help would be greatly appreciated.

Thanks
Josh

Unable to use all these in VC 2010

Project files do not open anything in Solution Explorer with tons of errors in Output.

How to use this?

I can add extra header paths and libraries paths and dependencies, but how to add these sockets to my existing VC Project that already has a window and stuff?

Which file to include so I could just create a new websocket?

If I include a header which path I need to add to the project?

Completely lost here...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.