1
0
mirror of https://github.com/payden/libwsclient synced 2024-10-27 17:54:01 +00:00
Commit Graph

28 Commits

Author SHA1 Message Date
Payden Sutherland
d416fcb62c I guess the config.h.in is needed 2012-11-25 02:07:46 -05:00
Payden Sutherland
5564a6e1f2 Add config.h.in to gitignore. Kill helper_thread. 2012-11-17 17:47:32 -05:00
Payden Sutherland
06ac80bd3b Change connection str back to echo.websocket.org 2012-11-17 12:12:15 -05:00
Payden Sutherland
5b6c5e24fe Fix handshake, add support for SSL (wss) 2012-11-17 12:09:18 -05:00
Payden Sutherland
550ce57eab Add returns to non-void functions.
Let me at least pretend I know what I'm doing in C.
2012-11-16 22:39:35 -05:00
Payden Sutherland
fbca00fc4d Remove silly 1 byte memcpys 2012-11-16 22:31:02 -05:00
Payden Sutherland
b09c6949eb Add method for fragmented messages.
And use this method for UNIX socket piping.
2012-11-16 22:26:44 -05:00
Payden Sutherland
89bc677a40 Bugfixes
Modifying payload_len_small in libwsclient_send by OR'ing with 0x80
Just set the frame byte appropriately without modifying payload_len_small

Also move setting payload_sz back to WS_HELPER_RECV_BUF size
*before* memsetting..  overflowing my bounds there.  Woops.
2012-11-15 19:16:17 -05:00
Payden Sutherland
1ac960127e Update README.md 2012-11-15 11:19:56 -05:00
Payden Sutherland
6e47f675cb Update README.md 2012-11-15 11:19:36 -05:00
Payden Sutherland
a614427995 Update README.md 2012-11-15 11:18:22 -05:00
Payden Sutherland
bd9d5faa94 Update README.md again 2012-11-15 11:14:07 -05:00
Payden Sutherland
2b2689e9da Update README.md and add some comments to test.c 2012-11-15 11:12:16 -05:00
Payden Sutherland
05a0f6309c Add libwsclient_helper_socket function.
This function binds UNIX socket listener with specified path.
Any data received by this UNIX socket is sent out as a
WebSocket text frame.  This allows a user to send data
on behalf of a running libwsclient program.  Will add
some documentation for the entire library soon.  Will go
into depth there.
2012-11-15 10:37:00 -05:00
Payden Sutherland
1ddfa42529 Free address info in libwsclient_open_connection 2012-11-15 00:12:48 -05:00
Payden Sutherland
de9d192fcb Merge branch 'master' of https://github.com/payden/libwsclient
Conflicts:
	wsclient.c
2012-11-14 23:50:48 -05:00
Payden Sutherland
0d753915e9 Remove fprintf and add TODO 2012-11-14 23:49:08 -05:00
Payden Sutherland
2f97330e9b Keep removing exit calls
There are some instances where we just need to bail.
For example, if we can't allocate memory, we are
out of gas.
2012-11-14 00:51:15 -05:00
Payden Sutherland
afe050ba79 Added wsclient_error type
Working on passing most errors to client code through
onerror callback.
2012-11-14 00:08:58 -05:00
Payden Sutherland
e8a7956336 Fix snprintf size greater than buffer size. 2012-10-30 00:20:06 -04:00
Payden Sutherland
0002a5bec3 Thread out main client run loop.
No reason to block here if you don't want/need to.  This frees up
the developer to do other useful work while the client is running.
2012-10-07 18:12:44 -04:00
Payden Sutherland
fda4e30b01 Add notification of unhandled control frames
Send a message to stderr.  I have an inkling one
of my programs is timing out because it's not responding
to server PINGs.  This might tell me that.  Useful anyway.
2012-10-07 16:44:54 -04:00
Payden Sutherland
b28c123b01 Do not allow libwsclient_send after close frame. 2012-10-06 17:10:22 -04:00
Payden Sutherland
a10c910559 Modify the API a little bit
Needed to have wsclient structure passed to callbacks for references
to sockfd or other API functions that need it. (libwsclient_close)

Also, respond to close frames correctly.  Right now, we just wait
on server to close TCP connection without a timeout.
2012-10-06 17:07:09 -04:00
Payden Sutherland
c24b62d0db Pthreads for opening connection 2012-10-06 14:14:08 -04:00
Payden Sutherland
b670d894f3 Stole a lot of stuff from libwebsock
For frame processing mostly.
2012-10-06 10:53:31 -04:00
Payden Sutherland
f4cbcd61d1 No symbolic links and add README.md 2012-10-05 20:50:37 -04:00
Payden Sutherland
d01f0a9e13 Initial commit of libwsclient
Only got the handshake and basic text frame sending done.
2012-10-05 20:46:37 -04:00