Lines Matching refs:state
44 static void netShutdown(JdwpNetState* state);
45 static void netFree(JdwpNetState* state);
85 static bool prepareSocket(JdwpState* state, const JdwpStartupParams* pParams) in prepareSocket() argument
93 state->netState = netStartup(port); in prepareSocket()
97 state->netState = netStartup(port); in prepareSocket()
98 if (state->netState != NULL) in prepareSocket()
102 if (state->netState == NULL) { in prepareSocket()
108 state->netState = netStartup(-1); in prepareSocket()
124 static bool awaitingHandshake(JdwpState* state) in awaitingHandshake() argument
126 return state->netState->awaitingHandshake; in awaitingHandshake()
232 static void netShutdownExtern(JdwpState* state) in netShutdownExtern() argument
234 netShutdown(state->netState); in netShutdownExtern()
260 static void netFreeExtern(JdwpState* state) in netFreeExtern() argument
262 netFree(state->netState); in netFreeExtern()
268 static bool isConnected(JdwpState* state) in isConnected() argument
270 return (state->netState != NULL && in isConnected()
271 state->netState->clientSock >= 0); in isConnected()
307 static bool checkConnection(JdwpState* state)
309 JdwpNetState* netState = state->netState;
340 static bool acceptConnection(JdwpState* state) in acceptConnection() argument
342 JdwpNetState* netState = state->netState; in acceptConnection()
392 static bool establishConnection(JdwpState* state) in establishConnection() argument
401 assert(state != NULL && state->netState != NULL); in establishConnection()
402 assert(!state->params.server); in establishConnection()
403 assert(state->params.host[0] != '\0'); in establishConnection()
404 assert(state->params.port != 0); in establishConnection()
414 int cc = gethostbyname_r(state->params.host, &he, auxBuf, sizeof(auxBuf), in establishConnection()
418 state->params.host, strerror(errno)); in establishConnection()
424 pEntry = gethostbyname(state->params.host); in establishConnection()
427 state->params.host, strerror(h_errno)); in establishConnection()
436 addr.addrInet.sin_port = htons(state->params.port); in establishConnection()
445 netState = state->netState; in establishConnection()
465 state->params.host, inet_ntoa(addr.addrInet.sin_addr), in establishConnection()
485 static void closeConnection(JdwpState* state) in closeConnection() argument
489 assert(state != NULL && state->netState != NULL); in closeConnection()
491 netState = state->netState; in closeConnection()
582 static bool handlePacket(JdwpState* state) in handlePacket() argument
584 JdwpNetState* netState = state->netState; in handlePacket()
619 dvmJdwpProcessRequest(state, &hdr, buf, dataLen, pReply); in handlePacket()
658 static bool processIncoming(JdwpState* state) in processIncoming() argument
660 JdwpNetState* netState = state->netState; in processIncoming()
809 return handlePacket(state); in processIncoming()
812 closeConnection(state); in processIncoming()
824 static bool sendRequest(JdwpState* state, ExpandBuf* pReq) in sendRequest() argument
826 JdwpNetState* netState = state->netState; in sendRequest()
855 static bool sendBufferedRequest(JdwpState* state, const struct iovec* iov, in sendBufferedRequest() argument
858 JdwpNetState* netState = state->netState; in sendBufferedRequest()