Lines Matching refs:ioc

41 qio_channel_socket_get_local_address(QIOChannelSocket *ioc,  in qio_channel_socket_get_local_address()  argument
44 return socket_sockaddr_to_address(&ioc->localAddr, in qio_channel_socket_get_local_address()
45 ioc->localAddrLen, in qio_channel_socket_get_local_address()
50 qio_channel_socket_get_remote_address(QIOChannelSocket *ioc, in qio_channel_socket_get_remote_address() argument
53 return socket_sockaddr_to_address(&ioc->remoteAddr, in qio_channel_socket_get_remote_address()
54 ioc->remoteAddrLen, in qio_channel_socket_get_remote_address()
62 QIOChannel *ioc; in qio_channel_socket_new() local
69 ioc = QIO_CHANNEL(sioc); in qio_channel_socket_new()
70 qio_channel_set_feature(ioc, QIO_CHANNEL_FEATURE_SHUTDOWN); in qio_channel_socket_new()
73 ioc->event = CreateEvent(NULL, FALSE, FALSE, NULL); in qio_channel_socket_new()
118 QIOChannel *ioc = QIO_CHANNEL(sioc); in qio_channel_socket_set_fd() local
119 qio_channel_set_feature(ioc, QIO_CHANNEL_FEATURE_FD_PASS); in qio_channel_socket_set_fd()
134 QIOChannelSocket *ioc; in qio_channel_socket_new_fd() local
136 ioc = qio_channel_socket_new(); in qio_channel_socket_new_fd()
137 if (qio_channel_socket_set_fd(ioc, fd, errp) < 0) { in qio_channel_socket_new_fd()
138 object_unref(OBJECT(ioc)); in qio_channel_socket_new_fd()
142 trace_qio_channel_socket_new_fd(ioc, fd); in qio_channel_socket_new_fd()
144 return ioc; in qio_channel_socket_new_fd()
148 int qio_channel_socket_connect_sync(QIOChannelSocket *ioc, in qio_channel_socket_connect_sync() argument
154 trace_qio_channel_socket_connect_sync(ioc, addr); in qio_channel_socket_connect_sync()
157 trace_qio_channel_socket_connect_fail(ioc); in qio_channel_socket_connect_sync()
161 trace_qio_channel_socket_connect_complete(ioc, fd); in qio_channel_socket_connect_sync()
162 if (qio_channel_socket_set_fd(ioc, fd, errp) < 0) { in qio_channel_socket_connect_sync()
172 qio_channel_set_feature(QIO_CHANNEL(ioc), in qio_channel_socket_connect_sync()
177 qio_channel_set_feature(QIO_CHANNEL(ioc), in qio_channel_socket_connect_sync()
187 QIOChannelSocket *ioc = QIO_CHANNEL_SOCKET(qio_task_get_source(task)); in qio_channel_socket_connect_worker() local
191 qio_channel_socket_connect_sync(ioc, addr, &err); in qio_channel_socket_connect_worker()
197 void qio_channel_socket_connect_async(QIOChannelSocket *ioc, in qio_channel_socket_connect_async() argument
205 OBJECT(ioc), callback, opaque, destroy); in qio_channel_socket_connect_async()
212 trace_qio_channel_socket_connect_async(ioc, addr); in qio_channel_socket_connect_async()
221 int qio_channel_socket_listen_sync(QIOChannelSocket *ioc, in qio_channel_socket_listen_sync() argument
228 trace_qio_channel_socket_listen_sync(ioc, addr, num); in qio_channel_socket_listen_sync()
231 trace_qio_channel_socket_listen_fail(ioc); in qio_channel_socket_listen_sync()
235 trace_qio_channel_socket_listen_complete(ioc, fd); in qio_channel_socket_listen_sync()
236 if (qio_channel_socket_set_fd(ioc, fd, errp) < 0) { in qio_channel_socket_listen_sync()
240 qio_channel_set_feature(QIO_CHANNEL(ioc), QIO_CHANNEL_FEATURE_LISTEN); in qio_channel_socket_listen_sync()
262 QIOChannelSocket *ioc = QIO_CHANNEL_SOCKET(qio_task_get_source(task)); in qio_channel_socket_listen_worker() local
266 qio_channel_socket_listen_sync(ioc, data->addr, data->num, &err); in qio_channel_socket_listen_worker()
272 void qio_channel_socket_listen_async(QIOChannelSocket *ioc, in qio_channel_socket_listen_async() argument
281 OBJECT(ioc), callback, opaque, destroy); in qio_channel_socket_listen_async()
289 trace_qio_channel_socket_listen_async(ioc, addr, num); in qio_channel_socket_listen_async()
298 int qio_channel_socket_dgram_sync(QIOChannelSocket *ioc, in qio_channel_socket_dgram_sync() argument
305 trace_qio_channel_socket_dgram_sync(ioc, localAddr, remoteAddr); in qio_channel_socket_dgram_sync()
308 trace_qio_channel_socket_dgram_fail(ioc); in qio_channel_socket_dgram_sync()
312 trace_qio_channel_socket_dgram_complete(ioc, fd); in qio_channel_socket_dgram_sync()
313 if (qio_channel_socket_set_fd(ioc, fd, errp) < 0) { in qio_channel_socket_dgram_sync()
339 QIOChannelSocket *ioc = QIO_CHANNEL_SOCKET(qio_task_get_source(task)); in qio_channel_socket_dgram_worker() local
344 qio_channel_socket_dgram_sync(ioc, data->localAddr, in qio_channel_socket_dgram_worker()
351 void qio_channel_socket_dgram_async(QIOChannelSocket *ioc, in qio_channel_socket_dgram_async() argument
360 OBJECT(ioc), callback, opaque, destroy); in qio_channel_socket_dgram_async()
367 trace_qio_channel_socket_dgram_async(ioc, localAddr, remoteAddr); in qio_channel_socket_dgram_async()
377 qio_channel_socket_accept(QIOChannelSocket *ioc, in qio_channel_socket_accept() argument
383 cioc->remoteAddrLen = sizeof(ioc->remoteAddr); in qio_channel_socket_accept()
384 cioc->localAddrLen = sizeof(ioc->localAddr); in qio_channel_socket_accept()
387 trace_qio_channel_socket_accept(ioc); in qio_channel_socket_accept()
388 cioc->fd = qemu_accept(ioc->fd, (struct sockaddr *)&cioc->remoteAddr, in qio_channel_socket_accept()
395 trace_qio_channel_socket_accept_fail(ioc); in qio_channel_socket_accept()
416 trace_qio_channel_socket_accept_complete(ioc, cioc, cioc->fd); in qio_channel_socket_accept()
426 QIOChannelSocket *ioc = QIO_CHANNEL_SOCKET(obj); in qio_channel_socket_init() local
427 ioc->fd = -1; in qio_channel_socket_init()
432 QIOChannelSocket *ioc = QIO_CHANNEL_SOCKET(obj); in qio_channel_socket_finalize() local
434 if (ioc->fd != -1) { in qio_channel_socket_finalize()
435 QIOChannel *ioc_local = QIO_CHANNEL(ioc); in qio_channel_socket_finalize()
439 socket_listen_cleanup(ioc->fd, &err); in qio_channel_socket_finalize()
446 qemu_socket_unselect(ioc->fd, NULL); in qio_channel_socket_finalize()
448 close(ioc->fd); in qio_channel_socket_finalize()
449 ioc->fd = -1; in qio_channel_socket_finalize()
501 static ssize_t qio_channel_socket_readv(QIOChannel *ioc, in qio_channel_socket_readv() argument
509 QIOChannelSocket *sioc = QIO_CHANNEL_SOCKET(ioc); in qio_channel_socket_readv()
554 static ssize_t qio_channel_socket_writev(QIOChannel *ioc, in qio_channel_socket_writev() argument
562 QIOChannelSocket *sioc = QIO_CHANNEL_SOCKET(ioc); in qio_channel_socket_writev()
634 static ssize_t qio_channel_socket_readv(QIOChannel *ioc, in qio_channel_socket_readv() argument
642 QIOChannelSocket *sioc = QIO_CHANNEL_SOCKET(ioc); in qio_channel_socket_readv()
682 static ssize_t qio_channel_socket_writev(QIOChannel *ioc, in qio_channel_socket_writev() argument
690 QIOChannelSocket *sioc = QIO_CHANNEL_SOCKET(ioc); in qio_channel_socket_writev()
728 static int qio_channel_socket_flush(QIOChannel *ioc, in qio_channel_socket_flush() argument
731 QIOChannelSocket *sioc = QIO_CHANNEL_SOCKET(ioc); in qio_channel_socket_flush()
755 qio_channel_wait(ioc, G_IO_ERR); in qio_channel_socket_flush()
806 qio_channel_socket_set_blocking(QIOChannel *ioc, in qio_channel_socket_set_blocking() argument
810 QIOChannelSocket *sioc = QIO_CHANNEL_SOCKET(ioc); in qio_channel_socket_set_blocking()
822 qio_channel_socket_set_delay(QIOChannel *ioc, in qio_channel_socket_set_delay() argument
825 QIOChannelSocket *sioc = QIO_CHANNEL_SOCKET(ioc); in qio_channel_socket_set_delay()
835 qio_channel_socket_set_cork(QIOChannel *ioc, in qio_channel_socket_set_cork() argument
838 QIOChannelSocket *sioc = QIO_CHANNEL_SOCKET(ioc); in qio_channel_socket_set_cork()
845 qio_channel_socket_get_peerpid(QIOChannel *ioc, in qio_channel_socket_get_peerpid() argument
850 QIOChannelSocket *sioc = QIO_CHANNEL_SOCKET(ioc); in qio_channel_socket_get_peerpid()
873 qio_channel_socket_close(QIOChannel *ioc, in qio_channel_socket_close() argument
876 QIOChannelSocket *sioc = QIO_CHANNEL_SOCKET(ioc); in qio_channel_socket_close()
884 if (qio_channel_has_feature(ioc, QIO_CHANNEL_FEATURE_LISTEN)) { in qio_channel_socket_close()
900 qio_channel_socket_shutdown(QIOChannel *ioc, in qio_channel_socket_shutdown() argument
904 QIOChannelSocket *sioc = QIO_CHANNEL_SOCKET(ioc); in qio_channel_socket_shutdown()
928 static void qio_channel_socket_set_aio_fd_handler(QIOChannel *ioc, in qio_channel_socket_set_aio_fd_handler() argument
935 QIOChannelSocket *sioc = QIO_CHANNEL_SOCKET(ioc); in qio_channel_socket_set_aio_fd_handler()
942 static GSource *qio_channel_socket_create_watch(QIOChannel *ioc, in qio_channel_socket_create_watch() argument
945 QIOChannelSocket *sioc = QIO_CHANNEL_SOCKET(ioc); in qio_channel_socket_create_watch()
946 return qio_channel_create_socket_watch(ioc, in qio_channel_socket_create_watch()