Lines Matching refs:state
44 static void netShutdown(JdwpNetState* state);
45 static void netFree(JdwpNetState* state);
49 * JDWP network state.
85 static bool prepareSocket(JdwpState* state, const JdwpStartupParams* pParams)
93 state->netState = netStartup(port);
97 state->netState = netStartup(port);
98 if (state->netState != NULL)
102 if (state->netState == NULL) {
108 state->netState = netStartup(-1);
124 static bool awaitingHandshake(JdwpState* state)
126 return state->netState->awaitingHandshake;
132 * Allocates a new state structure. If "port" is non-negative, this also
195 * Shut down JDWP listener. Don't free state.
232 static void netShutdownExtern(JdwpState* state)
234 netShutdown(state->netState);
238 * Free JDWP state.
260 static void netFreeExtern(JdwpState* state)
262 netFree(state->netState);
268 static bool isConnected(JdwpState* state)
270 return (state->netState != NULL &&
271 state->netState->clientSock >= 0);
307 static bool checkConnection(JdwpState* state)
309 JdwpNetState* netState = state->netState;
340 static bool acceptConnection(JdwpState* state)
342 JdwpNetState* netState = state->netState;
392 static bool establishConnection(JdwpState* state)
401 assert(state != NULL && state->netState != NULL);
402 assert(!state->params.server);
403 assert(state->params.host[0] != '\0');
404 assert(state->params.port != 0);
414 int cc = gethostbyname_r(state->params.host, &he, auxBuf, sizeof(auxBuf),
418 state->params.host, strerror(errno));
424 pEntry = gethostbyname(state->params.host);
427 state->params.host, strerror(h_errno));
436 addr.addrInet.sin_port = htons(state->params.port);
445 netState = state->netState;
465 state->params.host, inet_ntoa(addr.addrInet.sin_addr),
483 * Reset the state so we're ready to receive a new connection.
485 static void closeConnection(JdwpState* state)
489 assert(state != NULL && state->netState != NULL);
491 netState = state->netState;
582 static bool handlePacket(JdwpState* state)
584 JdwpNetState* netState = state->netState;
619 dvmJdwpProcessRequest(state, &hdr, buf, dataLen, pReply);
658 static bool processIncoming(JdwpState* state)
660 JdwpNetState* netState = state->netState;
809 return handlePacket(state);
812 closeConnection(state);
824 static bool sendRequest(JdwpState* state, ExpandBuf* pReq)
826 JdwpNetState* netState = state->netState;
855 static bool sendBufferedRequest(JdwpState* state, const struct iovec* iov,
858 JdwpNetState* netState = state->netState;