Home | History | Annotate | Download | only in android

Lines Matching full:pipe

17 /* This file implements the 'tcp:' goldfish pipe type which allows
30 /* Implement the OpenGL fast-pipe */
75 netPipe_free( NetPipe* pipe )
80 fd = pipe->io->fd;
81 loopIo_done(pipe->io);
84 /* Release the pipe object */
85 AFREE(pipe);
90 netPipe_resetState( NetPipe* pipe )
92 if ((pipe->wakeWanted & PIPE_WAKE_WRITE) != 0) {
93 loopIo_wantWrite(pipe->io);
95 loopIo_dontWantWrite(pipe->io);
98 if (pipe->state == STATE_CONNECTED && (pipe->wakeWanted & PIPE_WAKE_READ) != 0) {
99 loopIo_wantRead(pipe->io);
101 loopIo_dontWantRead(pipe->io);
112 NetPipe* pipe = opaque;
116 /* If the guest already ordered the pipe to be closed, delete immediately */
117 if (pipe->state == STATE_CLOSING_GUEST) {
118 netPipe_free(pipe);
124 if (pipe->hwpipe != NULL) {
125 goldfish_pipe_close(pipe->hwpipe);
126 pipe->hwpipe = NULL;
129 pipe->state = STATE_CLOSING_SOCKET;
130 netPipe_resetState(pipe);
135 * event on the network pipe.
140 NetPipe* pipe = opaque;
146 if (pipe->state == STATE_CONNECTING) {
147 AsyncStatus status = asyncConnector_run(pipe->connector);
154 netPipe_closeFromSocket(pipe);
157 pipe->state = STATE_CONNECTED;
158 netPipe_resetState(pipe);
164 if ((pipe->wakeWanted & PIPE_WAKE_READ) != 0) {
170 if ((pipe->wakeWanted & PIPE_WAKE_WRITE) != 0) {
177 goldfish_pipe_wake(pipe->hwpipe, wakeFlags);
178 pipe->wakeWanted &= ~wakeFlags;
182 netPipe_resetState(pipe);
189 NetPipe* pipe;
191 ANEW0(pipe);
193 pipe->hwpipe = hwpipe;
194 pipe->state = STATE_INIT;
202 netPipe_free(pipe);
206 loopIo_init(pipe->io, looper, fd, netPipe_io_func, pipe);
207 asyncConnector_init(pipe->connector, address, pipe->io);
208 pipe->state = STATE_CONNECTING;
210 status = asyncConnector_run(pipe->connector);
214 netPipe_free(pipe);
218 pipe->state = STATE_CONNECTED;
219 netPipe_resetState(pipe);
223 return pipe;
233 NetPipe* pipe = opaque;
234 netPipe_free(pipe);
241 NetPipe* pipe = opaque;
254 int len = socket_send(pipe->io->fd, buff->data + buffStart, avail);
295 NetPipe* pipe = opaque;
308 int len = socket_recv(pipe->io->fd, buff->data + buffStart, avail);
348 NetPipe* pipe = opaque;
349 unsigned mask = loopIo_poll(pipe->io);
363 NetPipe* pipe = opaque;
367 pipe->wakeWanted |= flags;
368 netPipe_resetState(pipe);
463 * by openglesPipe_init() to refuse a pipe connection if the function
472 NetPipe *pipe;
477 D("Trying to open the OpenGLES pipe without GPU emulation!");
485 pipe = (NetPipe *)netPipe_initUnix(hwpipe, _looper, unix_path);
486 D("Creating Unix OpenGLES pipe for GPU emulation: %s", unix_path);
493 pipe = (NetPipe *)netPipe_initTcp(hwpipe, _looper, temp);
494 D("Creating TCP OpenGLES pipe for GPU emulation!");
496 if (pipe != NULL) {
498 socket_set_nodelay(pipe->io->fd);
505 if (setsockopt(pipe->io->fd, SOL_SOCKET, SO_SNDBUF,
514 return pipe;