aboutsummaryrefslogtreecommitdiffstats
path: root/examples/stream-client.c
AgeCommit message (Collapse)AuthorFilesLines
2019-02-20Stream client: add disconnect callbackMax1-0/+8
It's similar to connect_cb() but called once client has been disconnected. Change-Id: I905adb2d6191216551a3bcdcd1aec1f96f01612a
2019-02-05Add socket name functions to stream client/serverMax1-1/+1
Add functions to get the description of a server link or client connection which examine data on corresponding socket. Those functions use static buffers and intended for single use in log/printf statements as illustarted by corresponding example changes. Change-Id: If9a8e211da85956781479862a63c4fc6e53ed6be
2019-01-29Stream examples: log sent/received bytesMax1-5/+12
Make client and server examples more verbose by logging actual bytes sent/received. Change-Id: I6979b2f92c96c2366f18bf31e4bc495a6709133a
2019-01-29Stream examples: filter internal loggingMax1-0/+1
Set category filter to make sure internal library logging won't interfere with example's own logging. It's also nice example illustrating log_set_category_filter() usage. Change-Id: I17d7878d302f011d8ff0d86708d677f5b559299e
2018-04-17examples: use osmo_init_logging2Pau Espin Pedrol1-2/+2
Change-Id: I7f1f4503f254931edeebfbadf3953efa7b20f85f
2016-12-01stream-client: check read() return value before using it as length input to ↵Harald Welte1-1/+2
memcpy Change-Id: Id962821c71b3a1c4c01c1131eb809b8ec8eaa062 Fixes: Coverity CID 57859
2016-12-01stream-client: Check for osmo_fd_register() return valueHarald Welte1-1/+6
Change-Id: I1b5fa97d14e69ff502b6deba0fd898a01e53420f Fixes: Coverity CID 57633
2016-01-23Do not use strlen on binary inpitHolger Hans Peter Freyther1-1/+1
Coverity points out that buf might not be NULL terminated. For the memcpy ret was already used, so use ret for msgb_put as well. Fixes: CID#57922
2012-08-15src: shorter stream function namesPablo Neira Ayuso1-20/+20
%s/_client_conn_/_cli_/g %s/_server_conn_/_srv_/g %s/_client_/cli/g %s/server/srv/g %s/RECONFIG/RECONF/g %s/SERVER/SRV/g %s/CLIENT/CLI/g
2011-10-17stream: add osmo_stream_*_conn_recvPablo Neira Ayuso1-1/+14
Like c43bb089067ca05af4992fbafe46827a1f0a6e9b but for stream sockets.
2011-10-09stream: add osmo_ prefix to all functionsPablo Neira Ayuso1-17/+17
Modify examples as well to use the new API.
2011-10-05examples: add stream server/client examplePablo Neira Ayuso1-0/+124
This patch adds a couple of examples that allow chatting between the client and the server. For simplicity, the example only support one client.