Lines Matching refs:client
25 * libavformat multi-client network API usage example.
36 static void process_client(AVIOContext *client, const char *in_uri)
42 while ((ret = avio_handshake(client)) > 0) {
43 av_opt_get(client, "resource", AV_OPT_SEARCH_CHILDREN, &resource);
52 av_log(client, AV_LOG_TRACE, "resource=%p\n", resource);
58 if ((ret = av_opt_set_int(client, "reply_code", reply_code, AV_OPT_SEARCH_CHILDREN)) < 0) {
59 av_log(client, AV_LOG_ERROR, "Failed to set reply_code: %s.\n", av_err2str(ret));
62 av_log(client, AV_LOG_TRACE, "Set reply code to %d\n", reply_code);
64 while ((ret = avio_handshake(client)) > 0);
87 avio_write(client, buf, n);
88 avio_flush(client);
91 fprintf(stderr, "Flushing client\n");
92 avio_flush(client);
93 fprintf(stderr, "Closing client\n");
94 avio_close(client);
103 AVIOContext *client = NULL, *server = NULL;
129 if ((ret = avio_accept(server, &client)) < 0)
131 fprintf(stderr, "Accepted client, forking process.\n");
142 process_client(client, in_uri);
147 avio_close(client);